linux - Execute commands in a file -
i using 2003 textbook - http://www.amazon.com/unix-shell-programming-3rd-edition/dp/0672324903
my os linux l-ubuntu 13 not based on posix (i think)
it says can store who | wc -l
in file called nu , execute nu. but, before need make file executable using chmod +x file(s)
. not work. how make nu "command" work ? know can naming nu nu.sh , doing bash nu.sh
, want try way also.
to execute file not in path, must give qualified directory name. while giving name of file in current directory sufficient argument program, in order execute shell script or other executable file, must give @ least relative path. example, if file in home directory, working directory, of following acceptable:
./nu ~/nu /home/username/nu
however, nu
attempt search path, includes places such /bin, /usr/bin, , on.
Comments
Post a Comment