15 amazing example of deleting lines from file using sed | Unix command
HTML-код
- Опубликовано: 26 авг 2024
- In this video we will discuss how to delete lines from a file using sed command.We will see 15 unique example.
Learn Unix Command :
1)cat command : • cat command in unix
2)ls command : • ls command in unix
3)mkdir and cd command : • mkdir and cd command
4)cp command : • cp command in unix
5)cut , paste and tr command : • Unix Command |cut | pa...
6)sort command: • sort command in Unix |...
7)uniq command : • uniq command in Unix |...
8)sed command : • sed command in Linux |...
9)Top 5 unix interview questions: • Top 5 Unix / Linux INT...
10)grep command : • grep command in Unix
11)15 amazing example in unix : • 15 Amazing Examples in...
Excellent ..very useful
Excellent..!!
Amazing video
Thanks for your vedios.
I am stuck in a problem .
My XMl FIle contains data like :
1234
2345
8787987
89898
80098
I want to arrange my xml file such that the tags and should be in a single line without space.
1234
2345
8787987
89898
80098
Tried many sed commands but no luck.Please help me to resolve it .
Damn thats hard. I think your sed command needs to achieve at least 2-3 different tasks so multiple sed commands piped inti each other or cincataned with -e argument or maybe many other helper arguments used instead.
I dont know how to do it just saying its very complex at first sight.
Have you figured it out? Please paste the answer if youve found it. 😊
How do you delete a duplicate lines ?
Can you plz let us know how to delete the content permanently with sed command ? In video, it's not clearly audiable
Use sed -i
Thanks but not explaining logic behind. Rather its like youre quickly doing your homework for school :)
So '$d' deletes the last line in the file. But is it in expanded form as '$//d' or '/$/d' ? 😅
Or the last example in the video. '${/line/d;}' how does this work? Are square brackets a common regex concept? Why the ; after the d ?