skundu
asked on
Shell Scripts (URGENT Please)
I need to run shell scripts on my Unix machine. On the $ prompt, when I type echo $SHELL, it shows /bin/tcsh.
If I type myvariable=hello, it says "command not found". How to run this command.
Also for the following script:
x=0
while [$x -lt 10]
do
echo $x
x = 'echo $x + 1'
done
To run the above do I need to store it in a file and then execute the file? Please let me know in detail. Thanks
If I type myvariable=hello, it says "command not found". How to run this command.
Also for the following script:
x=0
while [$x -lt 10]
do
echo $x
x = 'echo $x + 1'
done
To run the above do I need to store it in a file and then execute the file? Please let me know in detail. Thanks
ASKER
Thanks a lot. It worked.
Please tell me in tcsh shell, how can I assign a variable (say fruit) to a value (say apple)??
$fruit=apple
above command gives me error.
Also I have tchs shell, can I work on any other shell (like bash) somehow.
Please reply soon. Thanks.
Please tell me in tcsh shell, how can I assign a variable (say fruit) to a value (say apple)??
$fruit=apple
above command gives me error.
Also I have tchs shell, can I work on any other shell (like bash) somehow.
Please reply soon. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
in tcsh
set fruit=apple
echo $fruit
set fruit=apple
echo $fruit
set x=0
while ( $x < 10 )
echo $x
@ x += 1
end