i want the output which is having "F:\app\data\misc\server" only
i tried cat logfile.txt|grep "F:\app\data\misc\server"
not working
may i know the reason why its not working????and als need the grep command to filter the results
Single quotes pass \ intact, but double quotes see \ as an escape to put a double quote into the string:
$ echo '\'|cat -vte
\$
$ echo "\"|cat -vte
> ^C
$
I use single quotes first and most for their almost complete immunity to unintended meta-behavior. I figure it saves cycles in the shell.
But, hey, the answer is in there somewhere. I flash on FRED buffer scripts where we were seeing 4 or even 8 \ as the number halved every time you went through a meta-wall like the buffer!
But when i execute as ksh file it gives wrong output..i am getting RED..
means 0 lines having the status Running(if i give (SERVER_STATUS -eq 0) its showing GREEN)
SERVER_STATUS=`cat output.log |grep 'F:\\app\\data\\misc\\server'| grep Running| wc -l`
if [ $SERVER_STATUS -eq 10 ]
then
echo "GREEN"
else
echo "RED"
fi
I have to second bipinajith - without seeing the trace of the script giving a context to the error msgs you posted, we can't possibly tell the source of the error. It seems to me to be with the test command - here -vx option definitively helps!