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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -