research1695
New Member
Hello Linux users,
I want help with command line for the following purpose,
From a file, I want to delete line 1 to line x, where line x contains a specific phrase;
Phrase:[ hbonds_Protein ]
Filename: hbond.txt
In the attached file, this phrase is on line 37, in this case I want to delete lines 1 to 37.
Based on google search, I tried the following command, but it did not work.
sed '1,/[ hbonds_Protein ]/d' hbond.txt
Any insight would be appreciated,
Many thanks,
Neena
I want help with command line for the following purpose,
From a file, I want to delete line 1 to line x, where line x contains a specific phrase;
Phrase:[ hbonds_Protein ]
Filename: hbond.txt
In the attached file, this phrase is on line 37, in this case I want to delete lines 1 to 37.
Based on google search, I tried the following command, but it did not work.
sed '1,/[ hbonds_Protein ]/d' hbond.txt
Any insight would be appreciated,
Many thanks,
Neena