[SunHELP] awk help!
     
    
       
    Wed Nov 20 01:48:38 CST 2002
    
    
  
If I need to join output of command, filtered by awk
then concat them with variable of shell script.
Ex.
#!/bin/sh
read input
/path/to/command -v -d "$input" |grep '|' |awk '{ FS="|" }{ print
$1"\@"$input }'   
								^^^^^^^^^^
								|
								What I
stuck!                    
Ex.
assume $input from user is hello.world
==> /path/to/command -v -d "$input" | grep '|'
usera    |    1   |   2
userb    |    3   |   4
userc    |    5   |   6
==> |awk '{ FS="|" }
I got
usera^^^^
userb^^^^
userc^^^^
...(^ is space)....
what I need to be output is 
usera at hello.world
userb at hello.world
userc at hello.world
Hope this make sense
Thnks
Pat
    
    
More information about the SunHELP
mailing list