linux text processing commands

1. tr: delete or replace the text of a piece of information -d: delete -s: replace

2, col -x: convert the tab key to the equivalent space bar

3. split [-bl] filename: -b, followed by the size of the file to be split; -l, split by the number of lines

4. grep [-A][-B][--color=auto] 'Search string' filename

-A:after, in addition to listing this line, the following n lines are also listed

-B:before, in addition to listing the new lines, the previous n lines are also listed

--color=auto : The data to be searched can be listed in color

5. sed [-nefi] [action]

-n: quiet mode, only those that have been specially processed will be listed on the screen

-e: Edit the action of sed directly on the command mode

-f: write sed actions directly in a file

-i: directly modify the content of the read file, not by the screen

a: new

c: replace

d: delete

i: insert

p: print

s: replace

Guess you like

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