initial commit of bin scripts into git
This commit is contained in:
22
xword
Executable file
22
xword
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/tclsh
|
||||
|
||||
if { $argc != 1 } {
|
||||
puts stderr "Usage: $argv0 <pattern>"
|
||||
exit 1
|
||||
}
|
||||
set pat [lindex $argv 0]
|
||||
set first [string range $pat 0 0]
|
||||
|
||||
if { $first == "_" } {
|
||||
set pat [string range $pat 1 end]
|
||||
regsub -all {_} $pat {[a-z]} pat
|
||||
for { set let 97 } { $let < 123 } { incr let } {
|
||||
set chr [format "%c" $let]
|
||||
if { ! [catch {exec look $chr | egrep ^$chr$pat$} out] } {
|
||||
puts "$out"
|
||||
}
|
||||
}
|
||||
} else {
|
||||
regsub -all {_} $pat {[a-z]} pat
|
||||
puts [exec look $first | egrep ^$pat$]
|
||||
}
|
||||
Reference in New Issue
Block a user