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 ‘...
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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.