Learning Sed Is Beneficial For Linux Users

  Рет қаралды 86,910

DistroTube

DistroTube

Күн бұрын

Пікірлер: 148
@gordonbai5320
@gordonbai5320 3 жыл бұрын
sed and AWK are the first two tools I learned in undergraduate Linux class. They are so important, glad to see some brilliant recaps from DT!
@tweakernation
@tweakernation 3 жыл бұрын
@@try1785 I'm pretty sure any college with a Computer Science program has Linux classes
@gordonbai5320
@gordonbai5320 3 жыл бұрын
@@try1785 It's a class called Computer Software and System, sound pretty generic but it only focused on UNIX-like OS usage and history. The professor at the time was like, hey I think our students need to know these so let's open this course. Guess it varies among colleges. Now students have more choices, like DT's videos or MIT's popular 'missing semester'.
@Gornius
@Gornius 3 жыл бұрын
@@tweakernation I had Linux class, but used sed and awk more on Cybersecurity class, where we had to write many bash scripts.
@akileswar114
@akileswar114 Жыл бұрын
@@tweakernation we never had :_)
@jochebed8342
@jochebed8342 3 жыл бұрын
I really appreciate your high quality content. That takes Linux to a really high level!
@nbn22385
@nbn22385 3 жыл бұрын
Drink every time dt says "let me clear the screen" 😁
@Thomas-rl8kw
@Thomas-rl8kw 3 жыл бұрын
I took a drink every time he said sed 's/sed/replace/g' drink
@zero0bb
@zero0bb 3 жыл бұрын
Nlt dtrunk weeyt
@TheBlueThird
@TheBlueThird 3 жыл бұрын
Drinking....
@beingpravas
@beingpravas 3 жыл бұрын
But... Um...
@jamesbrasington8559
@jamesbrasington8559 2 жыл бұрын
This guys channel I just discovered and it is highly underrated. Love the clarity and explanations of everything with lots of examples. Thank you.
@Speykious
@Speykious 3 жыл бұрын
What works when you want to search for a word is to use the boundary characters, which happen to be \< for left and \> for right. So if you search for the sequence \, it's gonna try to find the word red alone, not included in another word.
@GokuSan389
@GokuSan389 3 жыл бұрын
Just wanted to write the same thing ... :)
@nobeltnium
@nobeltnium 3 жыл бұрын
good to know
@manavsaxena5579
@manavsaxena5579 3 жыл бұрын
Thanks for the tip
@crazychicken0378
@crazychicken0378 3 жыл бұрын
I knew this was coming as soon as I saw the awk tutorial. Great content, I appreciate it
@masamune5710
@masamune5710 3 жыл бұрын
This title is way better than the one for the awk vid
@DevvratSingh007
@DevvratSingh007 3 жыл бұрын
That title was just awkward.
@alicethegrinsecatz1611
@alicethegrinsecatz1611 3 жыл бұрын
Except for Germans, because SED was the socialistic party which controlled the dictatorship in East-Germany build by the Soviets...
@SumriseHD
@SumriseHD 3 жыл бұрын
@@alicethegrinsecatz1611 DIE PARTEI HAT IMMER RECHT 😂
@BrucesWorldofStuff
@BrucesWorldofStuff 3 жыл бұрын
I just love watching everyone's take on AWK & SED @DistroTube... So much fun an info once more! Loved the little joke at the end... Lol Lol Lol Thanks DT for the video! LLAP
@Rh0mbus
@Rh0mbus 3 жыл бұрын
I love the new background and environment for your recording space! Looks so good!
@ChucklesMcGee780
@ChucklesMcGee780 Жыл бұрын
brother DT, i want to thank you for making these videos. i swapped over full time to linux around 2 months ago. your videos have taught me so much, and i now have a desktop that looks incredible, that does incredible things. hands down my favourite linux creator in the tube. keep up the amazing work!!!!!
@AlastairMontgomery
@AlastairMontgomery 3 жыл бұрын
Been using sed for years, it's always good to watch how other people use it, you tend to pick up a few things you didn't know.
@voytechj
@voytechj 3 жыл бұрын
When creating sed regex expression it's a good idea to check what has been modified: $ sed '...' inputfile | diff inputfile you can pipe it further to a program that colorizes text: $ sed '...' inputfile | diff inputfile | bat -l diff For vim users you can use vimdiff (easier side by side comparison), but "process substitution" has to be used to trick vim that pipe is a file: $ vimdiff inputfile
@commentarysheep
@commentarysheep 9 ай бұрын
I knew all of the other Linux CLI utilities, but I always found the syntax of ‘sed’ funky. Thank you for your excellent explanation, DT! It’s way more efficient than using my text editor’s built-in search and replace feature!
@Eydamos
@Eydamos 3 жыл бұрын
I recently saw your awk video and now this sed video. Both are really great and I have learned a lot. Just one thing I want to point out as I had this issue just this week: If you have a big file e.g. let's say 3Gb log file and want to have 1000 line starting at line 30000 sed is a lot quicker then awk with this. In my test `sed -n '30000,31000p' file.log` took like 3 seconds while `awk 'NR==30000,NR==31000 {print $0}' file.log' took almost a minute
@TheSulross
@TheSulross 3 жыл бұрын
when -i option was added to sed, that was life changing - and that can use -e to specify multiple expressions to apply on the stream - sed is kind of like the single most potent unixy power tool
@arrtemfly
@arrtemfly 3 жыл бұрын
that's a very nice tutorial! thanks also i've noticed the lighting looks like you're in a proper studio on a photo shoot or something, cool stuff
@PrashantKumardaniel
@PrashantKumardaniel 3 жыл бұрын
Your videos are very comprehensive and upto the point. Keep it up
@mitchelvalentino1569
@mitchelvalentino1569 3 жыл бұрын
Srs, if you want to see some masterful sed code, check out games written in sed. Tetris, Breakout, Chess, etc. It’s humbling and trippy looking at the source.
@BrucesWorldofStuff
@BrucesWorldofStuff 3 жыл бұрын
Really! That's interesting... :-D LLAP
@mitchelvalentino1569
@mitchelvalentino1569 3 жыл бұрын
@@BrucesWorldofStuff LLAP 🖖
@VvC_Lad
@VvC_Lad 3 жыл бұрын
Wait that’s possible? I thought sed’s only for substituting and replacing
@sys7emH4cked
@sys7emH4cked Жыл бұрын
I recently saw your sed and awk command tutorials both are really helpful. Thank You ❣️ D.T, for making this useful tutorials .
@matthewdee6023
@matthewdee6023 3 жыл бұрын
'Pro' tip: most shells will clear the screen when you hit CTRL-L :) [edit] Oh, and CTRl-A and CTRL-E will take you to the beginning/end of the line (i.e. Emacs navigation commands).
@bahathir_
@bahathir_ 3 жыл бұрын
For GNU Sed, we can use the input's file name directly, without using '
@Shuliba
@Shuliba 3 жыл бұрын
Learning regex changed my life.
@chuckliddell6492
@chuckliddell6492 3 жыл бұрын
you posted this as I was trying to write a script to use pywal with lightdm-mini thanks dt
@n0kodoko143
@n0kodoko143 3 жыл бұрын
Stream editor goodness! Thanks DT
@thelostrider1
@thelostrider1 3 жыл бұрын
Would love to see DT talk more about shell scripting but in a more advanced way
@fennecbesixdouze1794
@fennecbesixdouze1794 2 жыл бұрын
If you're using GNU then you can match an exact word using /\bword\b/. The anchor "\b" represents a word boundary. You can also use /\/.
@altermetax
@altermetax 3 жыл бұрын
If you want to search for a word instead of a string, surround the word with \b. For example: sed 's/\bred\b/green/'
@fuahuahuatime5196
@fuahuahuatime5196 3 жыл бұрын
Had to replace hundreds of lines in a file with duplicate lines because a lazy coworker wouldn't do it themselves. Never again. Thanks for the video.
@ilshatt
@ilshatt Жыл бұрын
What a nice function, thanks for the explanation!
@Kavinnathcse
@Kavinnathcse 2 жыл бұрын
Awesome tutorial about sed .. Single stop for learning sed ..
@oneanime5551
@oneanime5551 3 жыл бұрын
Thank you so much for this video!!! Really appreciated
@1MinuteFlipDoc
@1MinuteFlipDoc 3 жыл бұрын
your audio quality is good (again!)
@littlepeon
@littlepeon 3 жыл бұрын
It's ok here, but can tell the gain is way up, it's max-ing out and causing DT to sound like he has a lisp at the end of most sentences!
@Yggdra666
@Yggdra666 3 жыл бұрын
"sed 11q.. it's really just a poor mans awk NR 13" I gotta love your humor, DT. Makes for great lessons.
@Yesdin007
@Yesdin007 2 жыл бұрын
thank you man , so important command
@l00t_t00l
@l00t_t00l 3 жыл бұрын
Third!
@mpotane
@mpotane 3 жыл бұрын
I want to add this sed, I use this to edit my host file. This will essentially add a line of text after the first match pattern. For example ==== sed -i '0,/pattern/!b;//a[the text u want to add]' filename
@damian_madmansnest
@damian_madmansnest 11 ай бұрын
for me an eye opener on sed was learning vim’s ex mode. sometimes it’s even faster to filter lines in vim through sed instead of running a similar vim ex command.
@paulofreireslaw
@paulofreireslaw 3 жыл бұрын
Thanks, studying this cmd in school atm
@chinonsoagueze4992
@chinonsoagueze4992 2 жыл бұрын
I’m a beginner and this video opend my brain 🧠
@greatmonk
@greatmonk 3 жыл бұрын
hey it was a very good session.. Thanks for this. I am going to watch your awk next...
@ceres11
@ceres11 3 жыл бұрын
18:00 you can do this with head (and even tail) too by writing "head +15 test.txt"
@ArvidDoerwald
@ArvidDoerwald 3 жыл бұрын
Must I write "first" if it happens to be so ?
@DistroTube
@DistroTube 3 жыл бұрын
Well, you did write it...
@joaonofap
@joaonofap 3 жыл бұрын
Lucky guy... I envy you.
@bhaveshverma8629
@bhaveshverma8629 3 жыл бұрын
Very very good sir. Keep up good work sir.
@mohammadrezaabbasi4841
@mohammadrezaabbasi4841 2 жыл бұрын
amazing course .thx dude
@liftlinux9421
@liftlinux9421 3 жыл бұрын
Now we need a digreen file manager
@MCgranat999
@MCgranat999 3 жыл бұрын
When you made the video on Awk the forest thing that came to my mind was Sed
@matiasm.3124
@matiasm.3124 3 жыл бұрын
Well nice video .. how to delete one empty line if the next line is an empty line ? And for printing x numbers of line you can use head -n XX file and avoid sed/awk.
@shahradelahi
@shahradelahi Жыл бұрын
Thanks for the video! I noticed some subtitle issues. Can they be corrected? Thank you sincerely.
@GuerreroMisterioso95
@GuerreroMisterioso95 3 жыл бұрын
Sed in Spanish means "be yourselves" (plural imperative second person of to be) or thirst
@jabarasadi3063
@jabarasadi3063 2 жыл бұрын
awesome man!
@nicholifamadico6619
@nicholifamadico6619 Жыл бұрын
Hi, may I ask how did you make your CLI show a type-ahead suggestion? Like for example when you started typing the command "sed", it already shows something like a format of what to type next in grey color. Is it from history? Thanks in advance!
@tecbs
@tecbs 3 жыл бұрын
thanks.. high quality content
@StephenMcGregor1986
@StephenMcGregor1986 3 жыл бұрын
hey DT, what do you think about the Level099Techs videos on Bash commands?
@IuliusPsicofactum
@IuliusPsicofactum 3 жыл бұрын
sed and unlimited power are synonyms.
@NNNPDawid
@NNNPDawid 3 жыл бұрын
Selection whole word i ezy in sed '\bword\b' gets whole word.
@TheGodSchema
@TheGodSchema 3 жыл бұрын
This is way better than the grapes video.
@virabadrasana
@virabadrasana 3 жыл бұрын
Really good! Thank you. I learnt a llot of tricks. One thing I would have liked to see included is capture groups. How do you capture specific strings? Top quality, thanks!
@kaineuler
@kaineuler 3 жыл бұрын
Hello dt , i know this may be far fetched but is there a chance you can make an iso of your arch with all the theming and text editors (emacs) and terminal configuration settings for your viewers. I really appreciate your arch setup.
@amirammar6687
@amirammar6687 2 жыл бұрын
I found your video so useful!
@jamesleimer2527
@jamesleimer2527 3 жыл бұрын
what linux distro do you use and also the desktop enviroment and terminal?
@redd6231
@redd6231 3 жыл бұрын
In reality, dt's name isn't "Taylor" nor "Tyler", it's either "Tayler" or "Tylor".
@1MinuteFlipDoc
@1MinuteFlipDoc 3 жыл бұрын
I thought it was Tiffany?
@redd6231
@redd6231 3 жыл бұрын
@@1MinuteFlipDoc That's a good one ! But dt is wearing a shirt with "Marley" written on it so I guess it's his real name...
@kacperfilipek8461
@kacperfilipek8461 3 жыл бұрын
1:25 Why use < when you can just pass a filename as an argument to sed like this? sed 's/find/replace/' filename
@LHCB6
@LHCB6 3 жыл бұрын
Beginner's guide? Maybe just the syntax he's used to
@theonlyvenu
@theonlyvenu 3 жыл бұрын
hey dt, your opinions about windows 11 "the proprietary garbage"
@corycaserta748
@corycaserta748 Жыл бұрын
Could someone please comment the name of the shell-color-script shown in this video, the random-colored histogram one? And can someone show where it can be downloaded? It doesn't seem to be on the DistroTube gitlab page. Thank you, Derek for awesome YT Linux content and instruction! Any further collections of shell-color-scripts would be much appreciated.
@fabrice9848
@fabrice9848 2 жыл бұрын
@13:21 I understand how this command works But I don't get why it doesn't work if we replace the * with a + we're looking for one or more spaces at the end of each line, so it should work when using + instead of * what am I missing here ?
@hernanfelipediaz566
@hernanfelipediaz566 3 жыл бұрын
I actually think that the space search pattern is not optimised, it is way better to use a '+' since it will only act when it is 1 or more instead of 0 or more. With '*', the command will make an action every single line, that's unefficient.
@daniahmed
@daniahmed Жыл бұрын
If i want to add a letter or a string at start of every line, then what would the command look like?
@bujin5455
@bujin5455 2 жыл бұрын
It seems to use a non standard version of regular expressions.
@nkpytelzhor
@nkpytelzhor 2 жыл бұрын
I admire the cooperation of your rapid thinking and typing commands, but for me 0.75 speed is ideal.
@GabrielMartinez-ez9ue
@GabrielMartinez-ez9ue 3 жыл бұрын
Is there a difference between: sed 's/find/replace/' < file1 > file2 //that i notice you use this redirect and sed 's/find/replace/' file1 > file2
@danielugalde5999
@danielugalde5999 Жыл бұрын
Thank you bro!
@hamedmahdavifar2293
@hamedmahdavifar2293 3 жыл бұрын
amazing . thank you.
@fabrice9848
@fabrice9848 2 жыл бұрын
How did you customize your man pages ?
@Nyarkfunky
@Nyarkfunky 9 ай бұрын
Thx for your work. 🐧🦎🐧
@YannMetalhead
@YannMetalhead 7 ай бұрын
Good video!
@renyirish
@renyirish 2 жыл бұрын
Subscribed! :) Although you speak incredibly fast for a foreign person like me Lol you are awesome! Thanks a million, really appreciate all of your great contents that I'm going to go through at any spare time I have ;) Have a great Easter holidays!
@pup4301
@pup4301 3 жыл бұрын
May you please do a video on just. Just is a command runner ment to fix some of the command runing problems of make. It really replaces make for me.
@Thomas-rl8kw
@Thomas-rl8kw 3 жыл бұрын
sed is almost as awkward as the aptly named awk program.
@olivermeissner5198
@olivermeissner5198 3 жыл бұрын
…I wonder how to replace all occurences of a period with a comma, before the first space in a line...
@alexcricles
@alexcricles 3 жыл бұрын
so, what is the difference between regex and sed command?
@alirezahassani8646
@alirezahassani8646 3 жыл бұрын
Hi sir useful video about sed. tnx
@nateswissmusic
@nateswissmusic 8 ай бұрын
what is the GUI being used here?
@VulcanOnWheels
@VulcanOnWheels 3 жыл бұрын
18:00 Not really, because you told sed to give you 11 lines. *confused*
@khomo12
@khomo12 2 жыл бұрын
Great!
@AdroSlice
@AdroSlice 3 жыл бұрын
Well at least the title isn't as presumptuous as the last.
@thedeathchimera
@thedeathchimera 3 жыл бұрын
Pssst... that’s what she sed...
@EndrChe
@EndrChe 3 жыл бұрын
I immediately find “ampersign” to be a far superior word to ampersand.
@danv8718
@danv8718 3 жыл бұрын
sed and awk and all that is nice and good, but have you seen the Windows 11 presentation?? They have "layouts" now. Just saying, it could be your next window manager...
@BurgerKingHarkinian
@BurgerKingHarkinian 3 жыл бұрын
Nobody has ever done this before!!
@mushtaqali5845
@mushtaqali5845 2 жыл бұрын
great tutorial but font too small for mobile phone
@RishiKumar-nz1tp
@RishiKumar-nz1tp 3 жыл бұрын
How's your man page colourful?
@matt92hun
@matt92hun 3 жыл бұрын
Just use ed, the standard editor.
@joefuentes2977
@joefuentes2977 3 жыл бұрын
I have no idea what he just sed.
@primechikweru3608
@primechikweru3608 2 жыл бұрын
your 'i don't know' sounds like sheldon's
@liftlinux9421
@liftlinux9421 3 жыл бұрын
Derek Tyler
@CreachterZ
@CreachterZ Ай бұрын
Sid is a guy from The Sex Pistols. sed is a Unix command. I can joke because I’ve got a Southern accent myself. 😅
@supermanbanty3210
@supermanbanty3210 Жыл бұрын
What is this tldr??
@КонстантинЛаськов-б3е
@КонстантинЛаськов-б3е 3 жыл бұрын
Are you Tyler Derden?
@MartinAhlman
@MartinAhlman 3 жыл бұрын
That's what she sed.
@0xva
@0xva 3 жыл бұрын
10:40 sed 's/usr/u/g; s/bin/b/g' should also work.
@ramongonzalezfernandez8904
@ramongonzalezfernandez8904 3 жыл бұрын
14:46 doesn't \s also work? (\\s)
Learning Awk Is Essential For Linux Users
20:02
DistroTube
Рет қаралды 306 М.
Xargs Should Be In Your Command Line Toolbag
16:24
DistroTube
Рет қаралды 101 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 2,7 МЛН
This Game Is Wild...
00:19
MrBeast
Рет қаралды 186 МЛН
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 11 МЛН
Is CachyOS The Ideal Desktop Linux Distro?
21:02
DistroTube
Рет қаралды 9 М.
Systemd Explained: The Ultimate Deep Dive for Linux Users
47:41
Learn Linux TV
Рет қаралды 198 М.
Linux Crash Course - The sed Command
15:25
Learn Linux TV
Рет қаралды 129 М.
Two Powerful Command Line Utilities 'cut' And 'tr'
15:18
DistroTube
Рет қаралды 34 М.
EVERYONE Needs to Learn a Little Bit of AWK!
16:29
Gary Explains
Рет қаралды 399 М.
Saving Time At The Command Line
13:49
DistroTube
Рет қаралды 76 М.
How To Use Shell Environment Variables
15:08
DistroTube
Рет қаралды 34 М.
Regular Expressions (Regex): All the Basics
21:39
Luke Smith
Рет қаралды 58 М.
Awk: Hack the planet['s text]!  (Presentation)
59:21
Benjamin Porter
Рет қаралды 38 М.
Search For Patterns Within Files With Grep
12:42
DistroTube
Рет қаралды 28 М.
Чистка воды совком от денег
00:32
FD Vasya
Рет қаралды 2,7 МЛН