My bash scripts has a variable $c which is called within a sed-line, directly followed by another parameter - and bash (actually fairly logical) seems to think that the other parameter belong to the variable name, rendering it useless/empty.
(...)
c=$(printf "%02d" $(echo "$i+1"|bc))
sed -n "$cq;d" /var/www/playlisten.txt|cut -c 4-
(...)
The first line sets a temp variable, then it is called as a sed argument. I need to show bash that $cends after the c and that the variable is not named $cq (which is empty, of course)...
Any ideas would be highly appreciated, as always.
Thanks, Christian.
PS. What I'm trying to accomplish :) with this is having a for-loop that steps thru 00..50, within the loop the number itself is needed but also the number +1. Just in case anyone want's to know.