awk array operations with examples
Awk array, it supports associative array, the index is a number or a string. awk array syntax: array_name[index]=value...
How to find and replace specified string with sed in linux/unix
find and replace content in linux: Use the grep command and sed command to search and replace, Use the find command and sed command to...
sed tutorial: sed in-place editing(-i option) with examples
Sed -i option, in-place editing of files, and can edit the operation file while the terminal does not output the sed execution result....
How to remove lines with specific line number from text file with awk or sed in Linux/unix
Remove specific line numbers in linux/unix, use awk NR variable to delete a specific line numbers, use sed command action option "d" to delete a...
sed tutorial: sed append command
The sed append command can add a new line before or after the specified matching line. We do this by using sed a and i...
sed tutorial: sed address and address range(select lines) with examples
sed address and address range tutorial, by using addresses or address ranges, the sed command can apply certain actions to these address lines....
How to use sed to replace multiple patterns at once in linux/unix?
sed is a powerful streaming text editor, and replace pattern is one of the most used functions. This article introduces how to replace multiple patterns...
How to remove the first line of a text file using the linux command line?
remove the first line: use awk NR variable, awk '{if(NR>1){print $0}}' file ; use sed action option d, sed '1d' file; use tail n...
How to delete empty lines in a text file in linux/unix
To delete blank lines in a text file, you can use awk NF variable, awk regular expression, sed regular expression and grep -v '^$'...
How to delete lines containing a specific string in a text file in linux/unix
Delete lines containing a specific string in a text file, we have three implementation methods: sed -i '/ pattern/d', grep -v 'pattern' and awk '!/pattern/...
Linux common commands tutorial and use examples
Linux Commands Tutorial
1. Linux common directory command list
2. Linux file operations commands
3. Linux file permissions commands
4. Linux file content view commands
5. Linux text processing commands
......
How to replace strings in files in the Linux command line
There are many ways to replace strings in Linux. You can use vim/vi to edit files, you can also use the sed command to replace,...
SheBang (#!) in linux/unix with examples and use cases
The script shebang (#!) Is explained in linux / unix. What is shebang, what is the shebang syntax, why should shebang be used, and shebang...
How to merge/convert multiple files into one file in linux
Merge/convert multiple files in linux.Examples:
Merge multiple files into one file,
sort and deduplicate multiple files and import one file,
sort multiple files and export duplicate content to...
How to print tree directory structure in linux/unix
Print tree directory structure in linux. Print the tree directory structure using the tree command;
Print multilevel tree directory structure using the find and awk combined...