1

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?

0

1 Answer 1

1

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".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.