Latest Posts
Tags
awk awk -F awk examples background run script bash awk command grep linux curl disk space docker commands docker usage du find and grep find examples Google Analytics grep -v grep examples java java example linux awk linux command linux find linux grep linux ls ls -al ls -lrt ls examples ls sort ls sort by size mkdir mv mv examples mysql mysql example rm sed sed examples sed tutorial seo Shell tutorial top vim vim examples vim tutorial w wordpress
Category Archives: Awk Command
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?
Awk classic case – awk analysis of nginx access logs
Awk classic case – awk analysis of nginx access logs.Count top visits and the number of visits in the most recent time. Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, linux awk
Comments Off on Awk classic case – awk analysis of nginx access logs
awk replace statement and examples
Awk replace statement can help us format the input data conveniently. Use of awk string manipulation functions: gsub() Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk gsub, awk replace, linux awk
Comments Off on awk replace statement and examples
awk tutorial: awk multiple conditions
Awk supports if else conditions judgment, and multiple conditions operations with && (and) or || (or) can be used. Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk multiple conditions, linux awk
Comments Off on awk tutorial: awk multiple conditions
How to use awk concatenate string in linux/unix
Awk concatenated strings, you can use awk OFS variables, or you can use strings directly. syntax: awk’BEING {s1=”string1″;s2=”string2″;OFS=”delimiter”;print s1,s2;}’ Continue reading
Posted in Awk Command, How to, Text Processing
Tagged awk concatenate string, awk examples, linux awk
Comments Off on How to use awk concatenate string in linux/unix
How to use awk to select substring in linux/unix
Awk substr has built-in functions that can help us select substrings anywhere in the input string. awk substr syntax: substr(string, start, lenght) Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk substr, linux awk
Comments Off on How to use awk to select substring in linux/unix
awk ternary condition judgment and examples
Awk ternary condition judgment is similar to the awk if else statement, providing branch control capability. Ternary syntax: ( Statement ) ? True : False ; Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk ternary, linux awk
Comments Off on awk ternary condition judgment and examples
awk OFS field separator with examples
Awk OFS field separator variable, output field separator. It is a pair with the Awk FS variable; awk FS separates strings as fields, and awk OFS connection fields as strings. Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk OFS, awk separator, linux awk
Comments Off on awk OFS field separator with examples
awk FS field separate with examples
awk separate string, you can use awk FS variable or awk -F option to support single delimiter and multiple delimiter regular matching. Continue reading
Posted in Text Processing, Awk Command
Tagged awk delimiter, awk examples, awk fs, awk separate, linux awk
Comments Off on awk FS field separate with examples
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 Continue reading
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 specific line numbers Continue reading
Posted in How to, Awk Command, Sed Command, Text Processing
Tagged awk examples, linux awk, sed examples
Comments Off on How to remove lines with specific line number from text file with awk or sed in Linux/unix
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 option, tail -n +2 file Continue reading
Posted in Text Processing, Awk Command, How to, Sed Command
Tagged awk examples, remove line, sed examples, tail examples
Comments Off on How to remove the first line of a text file using the linux command line?
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 ‘^$’ Continue reading
Posted in How to, Awk Command, Sed Command, Text Processing
Tagged awk examples, delete empty lines, grep examples, sed examples
Comments Off on How to delete empty lines in a text file in linux/unix
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/ {print $0}’ Continue reading
Posted in Text Processing, Awk Command, How to, Sed Command
Tagged awk examples, delete specific lines, grep examples, sed examples
Comments Off on How to delete lines containing a specific string in a text file in linux/unix
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 Continue reading
Posted in How to, Awk Command, Text Processing
Tagged awk examples, linux command, print tree directory structure
1 Comment