I downloaded the example code for "sed & awk." When I try to use the byState awk program as described on p. 24, with the command "sed -f nameState list | byState," I get this error message: "-bash: byState: command not found.”
A coworker withno knowledge of sed and awk gave me the answer: preface "byState" with "./," i.e., "sed -f nameState list | ./byState."
Why does this work but not the book's "sed -f nameState list | byState"?
OS X 10.11.2.
Help get this topic noticed by sharing it on Twitter, Facebook, or email.
That "./" before byState is telling the bash that the file is in the current directory.
If the byState file is in a directory that is in your bash PATH, then you wouldn't need to add the ./ in front of it, and could use the form that the book has.
I hope that helps,
O'Reilly Customer Service