Latest Posts
Tags
awk awk examples awk gsub awk substr background run script bash awk curl disk space docker commands docker usage du find and grep find examples Google Analytics grep examples head examples java java example linux awk linux command linux grep linux ls ls -a ls -al ls examples ls sort ls sort by size mkdir mv examples mysql mysql column to row mysql example PlantedTank rm sed sed examples sed tutorial seo Shell tutorial top vim vim examples vim tutorial w wordpress
Tag Archives: sed
How to convert a string to lowercase in Linux?
This section describes how to use sed, awk, TR commands to convert strings to lowercase in Linux Continue reading
Posted in Awk Command, Sed Command, Text Processing
Tagged convert lower, linux awk, sed, tr
Comments Off on How to convert a string to lowercase in Linux?
sed tutorial: sed replace
Sed replace, you can use the sed function: s, replace the text in the file. syntax: ➜ ~ sed ‘s/regexp/replacement/’ file Continue reading
Posted in Sed Command, Text Processing
Tagged sed, sed examples, sed replace
Comments Off on sed tutorial: sed replace
sed tutorial: sed insert line before match
Sed insert a line before match, you can use the sed function: i, add a new line before the matched string. syntax: sed ‘/option/i newLine’ file Continue reading
Posted in Sed Command, Text Processing
Tagged sed, sed examples, sed insert line before match
Comments Off on sed tutorial: sed insert line before match
sed tutorial: sed add line after match
sed add line after match, you use sed function: a , to add a new line after the matched string. syntax: sed ‘/option/a newLine’ file Continue reading
Posted in Sed Command, Text Processing
Tagged sed, sed add line after match, sed examples
Comments Off on sed tutorial: sed add line after match
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. Continue reading
Posted in Sed Command, Text Processing
Tagged sed, sed in-place, sed tutorial
Comments Off on sed tutorial: sed in-place editing(-i option) with examples
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 options command. Continue reading
Posted in Sed Command, Text Processing
Tagged sed, sed append, sed examples, sed tutorial
Comments Off on sed tutorial: sed append command
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. Continue reading
Posted in Internet Technology, Sed Command, Text Processing
Tagged sed, sed address, sed examples, sed tutorial
Comments Off on sed tutorial: sed address and address range(select lines) with examples
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 at once with sed. Continue reading
Posted in How to, Sed Command, Text Processing
Tagged replace multiple patterns, sed, sed examples
Comments Off on How to use sed to replace multiple patterns at once in linux/unix?
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, or you can search for all files to be replaced and replace them. Continue reading
Posted in How to, File & Directory, Sed Command, Text Processing, Vim Command
Tagged linux command, replace strings, sed
Comments Off on How to replace strings in files in the Linux command line
Sed command tutorial in linux/unix with examples and use cases
sed is a stream editor.
1. sed workflow
2. hold space and pattern space explain
3. sed syntax
4. sed debug tool
5. sed example
sed add/del/replace … Continue reading
Posted in Sed Command, Text Processing
Tagged gnu sed, pattern/hold space, sed, sed examples
Comments Off on Sed command tutorial in linux/unix with examples and use cases
How to using multiple delimiters in awk and sed
Multiple delimiter-separated fields in awk or sed.
Using awk command:
➜ awk -F'[:=|]’ ‘{print $1, $2, $3}’ test.log;
Using sed command:
➜ sed ‘s/[:=|]/ /g’ test.log Continue reading