awk

pattern scanning and processing language

copy
23
0
ls -l | grep '^d' | awk '{print "rm -r "$9}' | shRemove only the directories

6 years, 6 months ago john2 0 | details |

copy
5
0
awk '/myhome.html/ { system("nmap " $1 ">> logdir/myhome.html") }'

source | details |

copy
4
0
awk '$1 >100' employee.txtFind employee's that have an id > 100

6 years, 6 months ago john2 0 | details |

copy
3
0
echo hello | awk -F\e '{print $1 $2}'split hello on 'e' print first element on split followed by second

6 years, 6 months ago john2 0 | details |

copy
2
0
gawk 'BEGIN { print _"hello, world" }'

source | details |

copy
1
0
gawk -F'\t' ....

source | details |

copy
2
0
awk '/sam/' employee.txtPrint lies in employee.txt that match the keyword sam

6 years, 6 months ago john2 0 | details |

copy
1
0
awk '{print;}' employee.txtPrint every line in file employee.txt

6 years, 6 months ago john2 0 | details |

copy
1
0
awk '{print "display each word:",$1,"other word:",$2}' mywords.dataDisplay all the words in mywords.data

6 years, 6 months ago john2 0 | details |

copy
0
0
gawk -F\t ...

source | details |

copy
0
0
gawk --gen-po -f myprog.awk > myprog.po

source | details |

copy
0
0
gawk --version),

source | details |

copy
0
0
gawk 'BEGIN { print "hello, world" }'

source | details |