sed is more than search and replace

preview_player
Показать описание
Here I explain sed beyond the simple search and replace.

Let me know if you want a video about the more advanced feature of sed like pattern/hold space, branching and groups.

Social links:
Рекомендации по теме
Комментарии
Автор

I always felt a bit overwhelmed by the sed man page and never got around to reading and fully understanding it, now I'm sure I will, thanks for this great video.

feliperezxd
Автор

I'm pretty sure the next command you'll cover will be "awk", but you should definitely do a video on "join". It's one of my favorite commands and quite underrated in my opinion. For those not familiar with it, it lets you do SQL-like joins on text files (and/or stdin).

igstan
Автор

thanks for sharing! do `awk` next, the real 'swiss army knife' :)

ericfrazer
Автор

Sed is a pretty powerful tool with a pretty obscure syntax in non-trivial use cases.

GoldoEb
Автор

nice video
15:20 to add line numbers, there's the "nl" coreutil. Much simpler.

SC-yysw
Автор

Awesome content!! I use vim a ton and know many of the ed-style commands, but have never used sed because I’ve gotten good at awk. I’ve always wanted to know send a bit better, and this video was great for that. I have never understood the “pattern command” as clearly - I got confused with “s/pat/repl/flag” not fitting this - but really “s” is just a special function and doesn’t obey these rules. Or maybe you can make this command apply to a range and implicitly it is the whole file. Anyway - would love to see more advanced sed!

arisweedler
Автор

Great video. Fun fact: Lee McMahon wrote the original sed at Bell Labs

esra_erimez
Автор

how did you customize your cat output?

mprokop
Автор

My understanding of the "g" is that it means "greedy" rather than "global".

phyphor
Автор

Nice.
It would have been badass if near the end, you cleaned your file using sed!

arman
Автор

what shell are you using that allows you to use vim motions/commands? I noticed at some point that you replaced a character as if you were in vim, instead of removing and deleting the character

math
Автор

You should inform the newcomers that it's GNU sed, not sed. Thanks for the video, btw.

MartialBoniou
Автор

Great video! Thank you! Maybe you could do some vídeos about fish shell

rodelias
Автор

what this cat command is? some code of yours? it does not look like regular cat. great vid, btw.

aceJacek
Автор

yes it is, sed:
Search
End
Dreplace

MooImABunny
Автор

My best friend and I had a bet whether he could prove sed is Turing complete before a certain date. He succeeded by creating a Turing machine simulator using the multiline feature. He failed because he started two days after the deadline 😂

MeriaDuck