maclenin
January 6th, 2013, 07:21 PM
I am not quite sure how to sed this:
Substitue "A" for "B" in lines 5 and 11 and 34 and 92 and 108 within test_file.
I am able to substitue "A" for "B" in a range of lines within test_file:
sed -r '5,108 s/B/A/' -i test_file
I am also able to subsitute "A" for "B" in a single line within test_file:
sed -r '34 s/B/A/' -i test_file
Thanks for any guidance!
Substitue "A" for "B" in lines 5 and 11 and 34 and 92 and 108 within test_file.
I am able to substitue "A" for "B" in a range of lines within test_file:
sed -r '5,108 s/B/A/' -i test_file
I am also able to subsitute "A" for "B" in a single line within test_file:
sed -r '34 s/B/A/' -i test_file
Thanks for any guidance!