The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 09-11-2007
radoulov's Avatar
radoulov radoulov is offline
addict
 

Join Date: Jan 2007
Location: Milano, Italia/Варна, България
Posts: 2,020
With cut & paste from your post.

on Linux:

Code:
% cat file
CHANNEL(SYSTEM.DEF.CLUSRCVR) CHLTYPE(CLUSRCVR)
CHANNEL(TO.EAIDVBR1) CHLTYPE(CLUSRCVR)
% gawk '{print $2}' FS="[()]" file
SYSTEM.DEF.CLUSRCVR
TO.EAIDVBR1
% mawk '{print $2}' FS="[()]" file
SYSTEM.DEF.CLUSRCVR
TO.EAIDVBR1
on Solaris:

Code:
$ /usr/xpg4/bin/awk '{print $2}' FS="[()]" file
SYSTEM.DEF.CLUSRCVR
TO.EAIDVBR1
$ nawk '{print $2}' FS="[()]" file
SYSTEM.DEF.CLUSRCVR
TO.EAIDVBR1
Doesn't work with the old awk on Solaris, but gives a different result
(produce no output at all):

Code:
$ awk '{print $2}' FS="[()]" file

$
Reply With Quote