 What are the linux commands sed and awk used for and how to use them?

Very powerful text manipulation tools, sed, awk, grep, these three commands are all
unix systems that operate text files. There are several very command features:
1. For the kernel, unix files are byte sequences. io devices are also files.
2. As for the meaning of the file, it is up to the application to interpret it. Among them, the text file is very important, because Unix provides a lot of utilities (utility), these programs are relatively independent, but can achieve inter-process communication ( IPC ) through pipes, so that loose coupling can complete complex operations. So what is the data format of inter-process communication? In fact, for utilities, this data format is a simple text file. In addition, there is IO redirection, which is also a good idea. As for the format of the content in the text file? This is a very specific command, so manipulating the text becomes very important. grep, sed and awk are three commands for manipulating text files.
grep searches for
sed to modify and edit certain lines in text files.
awk is to access text files and manipulate some data in text files.
Do you understand?

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324683330&siteId=291194637