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 03-19-2009
chengamsiva chengamsiva is offline
Registered User
  
 

Join Date: Mar 2009
Location: bangalore,india
Posts: 2
Add another variable

Replace
your line :user_prog_name=$(echo ${line} | awk '{print $3}')

by :user_prog_name=$(echo ${line} | awk '{print $3 $4 $5 $6}')
(or)
user_prog_name=$(echo ${line} | awk '{print $3 " " $4 " " $5 " " $6}') to provide single space " " between $3,$4,$5 and $6 when the values are store in variable.


I am post this script after check.
It is running fine.
concept:
here we join the remaining last n coloumn and save it in a variable.
byebye..