Hey Guys,
I have a problem with my code. I have a lot of .dat files. In these files I want to change one expression to another.
My code is this:
let a=34;
for i in V13_*.dat;
do let a=a+1;
sed -i 's/Slice: Z=0.00635/V13_'$a'/' V13_*.dat;
echo $i;
echo $a;
done
My Problem is that every expression is changed to V13_35 and not to
V13_35
V13_36
V13_37
...
I think I have to submit the a into the sed-function, because echo $a shows
35
36
37
...
Someone get it?
Can you help me?
Tanks a lot.