bash to shell

  1. SoBe

    Solved #!/bin/sh how to save a shell command output into a string variable

    Hello fellow freeBSD forum members, Can you please help Is there anyway to save the following into a variable? What I would like to do is check to see if this output is != null when true adjust some LEDS The following does not function as expected: #!/bin/sh str=`pfctl -vvss | grep ‘...
  2. blind0ne

    Shell [[: not found

    hello, just trying to do this : text="$($1)" if [[ $text == *"-\n"* ]]; then text="$(cat $text | sed 's/-//g' | tr '\n' ' ')" elif [[ $text == *"\n"* ]]; then text="$(cat $texgt | tr '\n' ' ')" fi But [[]] not valid in /bin/sh, it's from bash How to do the same but in shell?