课程: Linux: Bash Shell and Scripts
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Using sed and AWK for more powerful scripting - Linux教程
课程: Linux: Bash Shell and Scripts
Using sed and AWK for more powerful scripting
- [Narrator] sed let's you do editing sort of commands, stuff you could do in an editor like vi, but as a filter so it's called a stream editor because you think of the input streaming through it and then it's producing output. So sed is great as a filter and it works great in scripts so you can essentially do a bunch of edits. You can have a batch of editings you do in a script, say process lots of files. Normally, sed applies it's editing commands to every line in a file if it matches something. So it processes a whole file and it doesn't change the file, it's just a file is passed into it, or maybe the output of a command is passed into it and it does it's processing, it produces the output. If you wanna use sed to actually edit a file you can do that too. You can use a sed -I option, then it applies the sed commands you've given it to the file in place. One of the most powerful things you could do with sed is use it's substitute command. The way the substitute command works is you…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。
内容
-
-
-
-
-
(已锁定)
Defining filters and using head, tail, and wc5 分钟 3 秒
-
(已锁定)
Using sed and AWK for more powerful scripting13 分钟 22 秒
-
(已锁定)
Positional parameters and operators with braces10 分钟 7 秒
-
(已锁定)
Challenges: Looping, special variable operators, sed, and AWK1 分钟 54 秒
-
(已锁定)
Solutions: Looping, special variable operators, sed, and AWK2 分钟 25 秒
-
(已锁定)
-
-