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
I've always done it with sed
var=`hg st -R "$path" | sed -e 's/ *$//'`
If there is a more elegant solution, I hope somebody posts it.