Great tutorial. But to clarify, the "-n" option is not for "negate". It simply will not print anything unless an explicit request to print is found. Different.
id,name,description,participants 1,"test1","description test 1","Frank,Tom,Dennis" 2,"test2","description test 2","Julia,Frank,Tim" 3,"test3","description test 3","Dennis,Jamie,Jim" 4,"test4","description test 4","Tom,Tim,Frank,Julia" 5,"test5","description test 5","Mike,Tom,Jamie" 6,"test6","description test 6","John,Mike,Frank" 7,"test7","description test 7","Julia,Ann,Dennis,Tom" 8,"test8","description test 8","Frank,Jamie" 9,"test9","description test 9","Ann,Tim"
Thank you for this tutorial, but I think it was not necessary to use the output ot the cat command as the input of the sed. You could have used sed at the very beginning of the command: sed -r '' my.csv
since this is a sed tutorial you could've only used sed command with providing the file name or path at the end of the command which would still give you the same output without the need to use cat command .
Thank you, this helped with better understanding which consequently helped me complete the TryHackMe website Linux Challenges room. My only question is why are you cat'ing into sed when you can just use sed itself: sed -n -r '2,4d' my.csv
Hi sir, i want to remove only particular line search like 'Frank' 'having more than 10 but here I want to delete Frank word in first 2 lines or randomly lines like 2,4 lines having word and I want to delete the same plz help mi in this
As already stated in your other comment, you're right, "negate" is an inappropriate term for the "-n" flag, as it rather means "don't print any lines by default". Thanks for the hint :)
You can specify multiple actions to sed via the '-e' switch, e.g. "sed -r -e 's/foo/bar/g' -e 's/ping/pong/g'" would replace all occurrences of "foo" with "bar" and also all occurrences of "ping" with "pong". Is that what you mean?
It enables Extended Regular Expressions, for example Quantifiers like "+" (for one or more occurrences of the preceding character) or curly braces, e.g. "{1,5}" (for one to five occurrences of the preceding char). These features are not being used in this video actually, so for the things explained in this video, you can omit the -r flag. I just always specify it out of habit. If you want to know more about Regular Expressions you might want to have a look at my video about that specific topic, ua-cam.com/video/AHn9HMTG9Yc/v-deo.html
Great tutorial. But to clarify, the "-n" option is not for "negate". It simply will not print anything unless an explicit request to print is found. Different.
-r enables extended regular expressions. These included quantifiers like +, {}, and posix character classes like [[:alpha:]]
Thanks for the tutorial!
id,name,description,participants
1,"First Name", "First name description"," Seth, John, Frank"
2,"Second Name", "Second Name Description", "Tom, Dick, Harry"
3,"Third Name", "Third Name Description", "Frank, Dick, Seth"
4,"Forth Name","Forth Name Description"," Seth, John, Frank"
5,"Fifth Name","Fifth Name Description","Rank, Marry, Frank"
6,"Sixth Name","Sixth Name Description","Tom, Harry, Frank"
7,"Seventh Name","Seventh Name Description", "Seth, Marry, Dick, Harry"
8,"Eighth Name","Eighth Name Description","Tom, Dick, Jones"
9,"Ninth Name","Ninth Name Description"," Marry, John, Tom"
id,name,description,participants
1,"test1","description test 1","Frank,Tom,Dennis"
2,"test2","description test 2","Julia,Frank,Tim"
3,"test3","description test 3","Dennis,Jamie,Jim"
4,"test4","description test 4","Tom,Tim,Frank,Julia"
5,"test5","description test 5","Mike,Tom,Jamie"
6,"test6","description test 6","John,Mike,Frank"
7,"test7","description test 7","Julia,Ann,Dennis,Tom"
8,"test8","description test 8","Frank,Jamie"
9,"test9","description test 9","Ann,Tim"
I wonder why such a to the point and good video hasnt earned many views? Where are all the Linux Lovers???
Sadly, there are not many.
Thank you for this tutorial, but I think it was not necessary to use the output ot the cat command as the input of the sed. You could have used sed at the very beginning of the command: sed -r '' my.csv
Your Voice perfectly fits my mood while i have to learn linux for work.
since this is a sed tutorial you could've only used sed command with providing the file name or path at the end of the command which would still give you the same output without the need to use cat command .
Thanks for the tutorial! Very good explanation and demonstration of sed.
Hey Man, let me know if you need help getting rid of the distracting white noise. Good tutorial.
Thanks for sharing. you saved me a lot of time.
Thank you, this helped with better understanding which consequently helped me complete the TryHackMe website Linux Challenges room. My only question is why are you cat'ing into sed when you can just use sed itself: sed -n -r '2,4d' my.csv
Awesome job. thank you for explanation. i never understood sed command but you made it so simple to understand
Very good basics keep it up ... i did not waste my time watching this video ... worth time
amazing video. very good for someone new to this language.
Excellent, thanks. Thorough and clear.
Hi sir, i want to remove only particular line search like 'Frank' 'having more than 10 but here I want to delete Frank word in first 2 lines or randomly lines like 2,4 lines having word and I want to delete the same plz help mi in this
Helped me a lot. Thanks
Clear and concise
Thank you! Very good explained video
Can you do a video showing calculations with sed?
sed -n -r '2,4p'? It should negate the printing right?So basically everything except 2,4 should be printed right????
As already stated in your other comment, you're right, "negate" is an inappropriate term for the "-n" flag, as it rather means "don't print any lines by default". Thanks for the hint :)
thank you so much for your time it s so helpful
informative, thank you
DANKE HAB MEIN AWK FERTIG EAAAAAAAAAAAAAAAASY
Sir actually, I like know may I use sed command for more than one string instead of a string..
Is it possible
You can specify multiple actions to sed via the '-e' switch, e.g. "sed -r -e 's/foo/bar/g' -e 's/ping/pong/g'" would replace all occurrences of "foo" with "bar" and also all occurrences of "ping" with "pong". Is that what you mean?
What does -n do?It doesnt seem like is negating to me.
You're right, "negation" is not the correct term for the "-n" flag, as it is more of a "don't print lines by default"
What is r flag in sed?
It enables Extended Regular Expressions, for example Quantifiers like "+" (for one or more occurrences of the preceding character) or curly braces, e.g. "{1,5}" (for one to five occurrences of the preceding char). These features are not being used in this video actually, so for the things explained in this video, you can omit the -r flag. I just always specify it out of habit.
If you want to know more about Regular Expressions you might want to have a look at my video about that specific topic, ua-cam.com/video/AHn9HMTG9Yc/v-deo.html
awesome
7:43 😂👍
Thanks! :)
3:23