Linux Awk Examples - Linux

Give example for awk command in linux?

Snippet Code


  
Rate this page :
  [ 0 votes]

Awk is an interrupted programming language which has the name from the developers. Awk are mainly used perform complex operation. Here, the awk command multiply the column-1 and column-2 and redirect the output to file2.txt. The command given below redirects the output to file2.txt.

file1.txt: ----------- 14 15 16 15 15 11 5 56 6 5 25 1 Command: -------------- awk '{print $1,$2,$1*$2}' file1.txt > file2.txt

Tags


Ask Questions

Ask Question