aboutsummaryrefslogtreecommitdiffstats
path: root/fch
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-08-22 19:01:48 -0400
committerSam Anthony <sam@samanthony.xyz>2024-08-22 19:01:48 -0400
commit654fe9f9a8ed988b8347db2b202e45c4ff52188e (patch)
tree97aa09e8e73b3294cfa6b80d28e651d955845abe /fch
downloadbin-654fe9f9a8ed988b8347db2b202e45c4ff52188e.zip
fch - find character
Diffstat (limited to 'fch')
-rwxr-xr-xfch17
1 files changed, 17 insertions, 0 deletions
diff --git a/fch b/fch
new file mode 100755
index 0000000..0c651d2
--- /dev/null
+++ b/fch
@@ -0,0 +1,17 @@
+#!/usr/bin/sh
+
+# Find CHaracter
+
+if [ $# -eq 0 ]
+then
+ echo "Usage: fch <charname>"
+ exit 2
+fi
+
+args="$@"
+awk -v charname="$args" '
+ $0 ~ charname {
+ printf "%s ",$0
+ system("9 unicode " $1)
+ }
+' /opt/plan9/lib/unicode