unix - Error while passing variables in sed -
my script:
while read start_val end_value = "$start_val+10" | bc sed -n '"$start_value","$end_value"d' <file> done < in_file
actually want print lines of file using data taken input file doing calculations.
it because variables not expanded inside of single quotes ('). try instance
echo '$home'
vs
echo "$home"
the same goes example single quotes after sed.
Comments
Post a Comment