Hi
following is a simple shell script,
--------------------------------
#!/usr/bin/tcsh
u=$USER
echo $u
string="cp c2960-lanbase-mz /tftpboot/$u/c2960-lanbase-mz"
string2="cp c2960-lanlite-mz /tftpboot/$u/c2960-lanlite-mz"
output=/users/$u/c2960-log.txt
if [ grep --quiet $string $output ] && [ grep --quiet $string2 $output ]
then
echo c2960-lanbase-mz >> /users/$u/success.txt
echo c2960-lanlite-mz >> /users/$u/success.txt
else
echo c2960-lanbase-mz >> /users/$u/failure.txt
echo c2960-lanlite-mz >> /users/$u/failure.txt
fi
----------------------
when execute I am getting following error
./shellscripts/grtest.sh
u=amvarma: Command not found.
u: Undefined variable.
Please let me know
Thx
Amit