I have a shell script with this code:
var=`hg st -R \"$path\"` if [ -n \"$var\" ]; then echo $var fi
But the conditional code always ex
This will remove all the whitespaces from your String,
VAR2="${VAR2//[[:space:]]/}"
/ replaces the first occurrence and // all occurrences of whitespaces in the string. I.e. all white spaces get replaced by – nothing
/
//