Popular
Latest Articles
- How to Secure your Cisco Router
- Creating CLI Views on a Cisco Router
- Configuring TACACS+ on a Cisco Router
- How to enable SDM on your router
- Build a Samba Server on Redhat / CentOS
- How to set the Time / Date and Timezone in CentOS
- How to install SSH on Solaris 10 x86
- ESX4 - How do I turn on/off a Virtual Machine from the command line ?
AWK - By Example
Friday, 27 February 2009 11:32
This will remove the columns $4 $5 $12 and $13.
awk 'BEGIN{FS=OFS=" "}{$4=$5=$12=$13=""}{print}' file.txt
This is break down each line and numbers each field.
awk '{print NR": "$0; for(i=1;i<=NF;++i)print "\t"i": "$i}'
We have 20 guests online