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
You can delete newlines with tr:
tr
var=`hg st -R "$path" | tr -d '\n'` if [ -n $var ]; then echo $var done