Il 01/28/2014 05:10 PM, Neil Watson ha scritto:
> Is there a utility to canonify strings in the shell for testing?
In a shell module of mine I use something in the lines of:
CESSID=$( echo $ESSID | tr -c "a-zA-Z0-9_" "_" | sed -e 's/_*$//' )
The sed line removes trailing underscores -- I always got one because of
a newline character in $ESSID. You may want to remove just one, or none,
or "chomp" your counterpart of ESSID beforehand.
Ciao!
-- bronto