From: Shrishailappa A. A. (STSD) <amb...@hp...> - 2007-02-20 04:32:27
|
Hi Patrick, Thanks for quick reply. Its working for me. =20 Thanks and Regards, Ambika =20 ________________________________ From: Goldsack, Patrick=20 Sent: Monday, February 19, 2007 5:21 PM To: Ambika Awanty; sma...@li... Cc: Shrishailappa Awanty, Ambika (STSD) Subject: RE: [Smartfrog-developer] How to write IF Else condition inRunsShellScript component? There are two ways in which you might enter this command:=20 =20 firstly as a multi-line string (should work, but I haven't tried it),=20 =20 ## if [ -s /tmp/list ] then echo "Not empty" else echo "Empty" fi # =20 the second as a single line using ; as a separator for the lines and escaping " =20 "if [ -s /tmp/list ] ; then echo \"Not empty\"; else echo \"Empty\"; fi" =20 Patrick ________________________________ From: sma...@li... [mailto:sma...@li...] On Behalf Of Ambika Awanty Sent: 19 February 2007 10:35 To: sma...@li... Cc: Shrishailappa Awanty, Ambika (STSD) Subject: [Smartfrog-developer] How to write IF Else condition inRunsShellScript component? Hi All, Can any one tell me how to write following logic in cmd field of RunShellScripts ? =20 if [ -s /tmp/list ] then echo "Not empty" else echo "Empty" fi =20 I cant write this in a file and execute that file in shell, because i want to deploy this component in another node, where this file wont be available. =20 Thanks and Regards, ambika =20 =20 ________________________________ Here's a new way to find what you're looking for - Yahoo! Answers <http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/> |