sed '1d' filename
it will delete the first line of the file.
sed '$d' filename
it will delete the last line of the file.
cat filename
it will show the content of the file
cat -b filename
it will show the content of the file with line number.
cat filename|grep -v 'word'
it will ignore the line which have a word.
sed 's/apple//g' filename
it will empty the file which has a word apple.
grep -r "word" *
search a particular word in a available lines
Note: post your doubts in comment. so that I will help you
it will delete the first line of the file.
sed '$d' filename
it will delete the last line of the file.
cat filename
it will show the content of the file
cat -b filename
it will show the content of the file with line number.
cat filename|grep -v 'word'
it will ignore the line which have a word.
sed 's/apple//g' filename
it will empty the file which has a word apple.
grep -r "word" *
search a particular word in a available lines
Note: post your doubts in comment. so that I will help you
No comments:
Post a Comment