I have a bunch of file numbers in the file 'test':
I'm trying the above command to change all the instances of "H" to "Na+" in the file testsds.pdb at the line numbers indicated in the file 'test'. I've tried the following and various similar alternatives but nothing is working:
cat test | while read line; do line=$line"s"; sed -i "$line/H /Na+/" testsds.pdb >> well ; done
Any help would be greatly appreciated.