I have problem in understeanding C-shell executing command. I don't know which brackets I should use / or maybe I set variable in a wrong way? Guide me if you can spare a moment
#!/bin/csh -f
if ( "$1" == "yes" ) then
ls -la
set path = `pwd | grep -c yes`
ls -la
endif
First ls -la execute normally, but after setting a variable between, second one gives back error "ls: Command not found."
What Im missing here?
path
is a very important variable in the C Shell. It holds the list of directories where the shell looks for executable programs. You should use a different name for your variable. Read the manual page for more detail; look for "Shell Special Variables".