A big part of our jobs requires some Shell Script knowledge. The Blog main goal is help anyone with scripts problems and doubts. Occasionally, anyone can send tips to the Blog that might help our every-day tasks.
Tuesday, January 25, 2011
Remove distinct line with sed
sed '4d;7d' file.txt
This will remove lines 4 and 7 from file.txt
sed '4,7d' file.txt
But this is a range, so will remove lines from 4 to 7 from file.txt
No comments:
Post a Comment