Linux - Awk

 


prints every line

# awk '{print}' <file_name> or <path>  

prints the lines that contains foo

# awk ' /foo/ {print}' /etc/passwd  

Use ':' as delimiter and prints 1.st and 4.rd fields

# awk -F: '{print $1, $4}' /etc/passwd






Comments

Popular posts from this blog

DB-Master

Star Trek: The Next Generation

Electroplating