skip to main | skip to sidebar

Solaris for System Admins

Repository for Solaris System Administrators

REGULAR EXPRESSION MATCHING IN AWK


If you ever find yourself typing :
# command | grep pattern | awk '{print $3}'

you can shorten this by using the regexp matching in awk, like this:
# command | awk '/pattern/{print $3}'

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Quick Ref. Link

  • ▼  2015 (9)
    • ▼  Aug (9)
      • More and Vi (or) More Vi
      • CLEANUP DOS FILES
      • awk ...
      • FORGET THE CRONTAB MAN
      • REGULAR EXPRESSION MATCHING IN AWK
      • Check the VMware Tools time synchronization config...
      • Command to check read only file system on Linux
      • Unable to get Virtual console on VMWare at runleve...
      • Solaris 8 Container Build
  • ►  2014 (4)
    • ►  May (1)
    • ►  Mar (1)
    • ►  Feb (2)
  • ►  2012 (6)
    • ►  Aug (6)
  • ►  2011 (5)
    • ►  Nov (1)
    • ►  Oct (3)
    • ►  Sep (1)
  • ►  2010 (1)
    • ►  Jan (1)
  • ►  2009 (3)
    • ►  Oct (1)
    • ►  Feb (1)
    • ►  Jan (1)
  • ►  2008 (11)
    • ►  Oct (9)
    • ►  Apr (2)

About Me

My photo
thamurali
View my complete profile