
04-25-2008
|
|
Shell programmer, author
|
|
|
Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,378
|
|
Quote:
Originally Posted by Ariean
Thanks for your reply, based on your suggestion i tried rewriting the code as below but some how i didn't understand why it is executing the statement in the else part even after the condition in the if statement is true or satisfied or pmcmd command getting executed. Could you please throw some light. Thank you.
==================
#!/bin/ksh
for file in /export/home/orainfodev/sam s ; do
|
Do you really intend to loop over two files, "/export/home/orainfodev/sam" and "s"?
If that is intended to be a single file, it needs to be quoted. And, if so, why are you using a loop?
|