The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 11-18-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,311
Use [ code ] and [ /code ] tags when posting logs, code etc., ty.


Code:
root@isau02:/data/tmp/testfeld> cat infile
a@some.net
b@some.net
c@some.net
d@some.net
root@isau02:/data/tmp/testfeld> V_TO=`head -1 infile`
root@isau02:/data/tmp/testfeld> echo $V_TO
a@some.net
root@isau02:/data/tmp/testfeld> V_CC=`awk 'NR > 1 {print}' infile`
root@isau02:/data/tmp/testfeld> echo $V_CC
b@some.net c@some.net d@some.net

When using the variables, maybe use "${VAR}" to make sure you get no troubles.