I know I can do:
echo ${var:-4}
to print 4
if var
is null,
but how to assign -n
in this case..?
echo ${var:--n}
does not work.
although this does work..
echo ${var:---n}
but in that case it prints out --n
and I need it to print -n
.