Latest Posts
- Finding Files by Date in Linux/Unix: A Comprehensive ‘find’ Command Guide
- Efficient File Search in Linux/Unix: A Guide to Using ‘find’ by Name
- How to Use the ‘find’ Command by File Type in Linux/Unix: A Practical Guide
- Best Practices for Sorting with the Top Command in Linux/Unix
- ls of command in linux
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 command 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 examples mysql mysql example rm sed sed examples sed tutorial seo Shell tutorial top vim vim examples vim tutorial w wordpress
Tag Archives: awk examples
AWK tutorial: find and kill process use awk
Step 1. View the process ID pid of the top command.
Step 2. Use the awk command to get the process ID.
Step 3. Use xargs kill to kill top process ID. Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, grep examples, linux command, xargs kill
1 Comment
AWK tutorial: awk -F and awk BEGIN{ FS … }
Usually, when I use awk for text processing, I prefer to use the awk -F option for text field separation. Of course, we can also use the combination of BEGIN and FS to achieve the same goal. Let’s take a … Continue reading
Posted in Awk Command, Text Processing
Tagged awk -F, awk begin fs, awk examples, linux awk, linux command
Comments Off on AWK tutorial: awk -F and awk BEGIN{ FS … }
AWK tutorial: awk regex example
What Is Regex?
Types of Regex:BRE and ERE.
Awk using BRE regex Patterns, Special Characters;
Awk using ERE regex Patterns, matches the start of text… Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk regex example, linux command
Comments Off on AWK tutorial: awk regex example
Linux shell batch move files, delete spaces, rename files
1. Use linux find, move files in batch;
2. Use linux find, delete empty directories in batch;
3. Use shell while loop, batch delete spaces in file names;
4. Use linux awk batch rename files;
Posted in Awk Command
Tagged awk examples, linux for loop, shell if else
Comments Off on Linux shell batch move files, delete spaces, rename files
awk loop example: awk for and while
awk for loop:
awk -F”#” ‘{for(i=1;iContinue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk for loop, awk while loop, linux awk
1 Comment
AWK tutorial: three ways of awk execution
Linux awk command execution ways: 1. Command line execution Detailed introduction of syntax, see 《Linux awk》 2. Shell script file execution Explanation: !/usr/bin/awk The first line of #!/usr/bin/awk is the awk command location. use : ➜ which awk /usr/bin/awk 3. … Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk exec, linux awk, linux command
Comments Off on AWK tutorial: three ways of awk execution
awk NR FNR difference
Linux awk command can use variables NR and FNR to process multiple files. NR : ordinal number of the current record, multiple files self-increase FNR : ordinal number of the current record in the current file awk NR example Processing … Continue reading
AWK tutorial: awk sort uniq
In daily development, we often use awk command to cut and sort log file columns and count them. awk sort uniq count example awk column count linux Sort – n : sorted by the size of the value; – r … Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk sort uniq, linux awk, linux command
Comments Off on AWK tutorial: awk sort uniq
AWK tutorial: split on character awk or cut
In the previous article, we introduced the use of linux awk for string cutting. Here we introduce a method. use awk -F parameter use awk split function For more awk usage, please refer to the following article: Let’s look at … Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk split, cud -d, linux command
Comments Off on AWK tutorial: split on character awk or cut
AWK tutorial: awk [-F] print example
– awk print last field
– print line number per line
– print specific columns
– use -F specifies a delimiter Continue reading
Posted in Awk Command, Text Processing
Tagged awk examples, awk NF NR, awk OFS, linux awk, linux command
Comments Off on AWK tutorial: awk [-F] print example
AWK tutorial: awk remove last character
awk remove last character use awk length and substr functions
Posted in Awk Command, Text Processing
Tagged awk examples, awk remove, linux awk, linux command
Comments Off on AWK tutorial: awk remove last character
AWK tutorial: awk save to file
AWK save to file AWK append to file
Posted in Awk Command, Text Processing
Tagged awk examples, bash awk, file Redirect, linux command
1 Comment
AWK tutorial: awk newline character
How to use Awk print out a newline character in a string ???
awk system batch operation
1. use awk command batch creation of files
awk ‘BEGIN {do {++i; system(“touch file_num_” i “_test”) } while (iContinue reading