Re: [Leaf-user] shell script problem
You need to use backticks (`) around ls, not single-quotes ('), to accomplish what you probably want. The script as written below works correctly. At 04:10 PM 2/27/02 +0100, sylvain pelletier wrote: >Hi, > >I would make a little script in sh on my lrp ( dachtein version) > >and i can't do this : > >for file in 'ls' ; do >echo "$file" >done > >the echo response is: ls > >what's wrong, the problem comes from lrp??? -- "Never tell me the odds!"--- Ray Olszewski-- Han Solo Palo Alto, CA[EMAIL PROTECTED] ___ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user
[Leaf-user] shell script problem
Hi, I would make a little script in sh on my lrp ( dachtein version) and i can't do this : for file in 'ls' ; do echo "$file" done the echo response is: ls what's wrong, the problem comes from lrp??? Thanks Sylvain ___ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user
Re: [Leaf-user] shell script - problem ...
Jeff Newmiller wrote: > grep is not grep on LRP... it is implemented with sed, and apparently the > return values do not behave the same. Informational note: Oxygen uses busybox grep. > Try: > > xx=`ip ro | grep 10.10.10.0` > if test ! "$xx" ; then > # do whatever you want if route is not there > fi Or: if [ -z "$(ip ro | grep 10.10.10.0)" ] ; then :# do whatever if route is missing... fi Note that "[" (test) in Oxygen is busybox test too - in fact, Oxygen uses busybox quite extensively. ___ Leaf-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user