<0> Hi. How can I use variable subs inside a sed statment. For example, I have: for i in *.dat; do cat template.m | sed -e 's/XXXX/${i%%.*}/g' > out.m; done , but the subs. of $i is not working <1> are you trying to use template.m as a list of substitutions?
<1> later, i'm out of here <2> tecnico: echo "$PATH"; echo '$PATH' <3> how can i remove the last two zereos in a number with sed command?+ <4> snikker: last 2 zeros that can be anywhere in the number or at the end of the number? <3> gnubien: at the end of the number <4> maybe easier with bash builtins <3> gnubien: ex: 5600000 and i want remove only the last two zeros... <3> gnubien: it's not possible with sed only? <4> snikker: echo "012034500" |sed 's/00$//' #0120345 <3> gnubien: great, thanks alot!!!