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 -->
  #5 (permalink)  
Old 04-28-2008
scorpio scorpio is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 41
Hi ,

Actually the log file is like 0608166896000001 in my first column 11 whitespaces and 3001339 in my second column( 3001339) then 11 whitespaces and
3204235 in my third coumn .
...

But while reading line by line using following code

while read data
do
echo data $data
ID_SA_SOURCE=`echo $data | cut -c17-35`
echo ID_SA_SOURCE $ID_SA_SOURCE
done < $TRACKING_LOGDIR/$listdata


I am not getting the 11 white spaces in "data" variable instead of i am getting only one space..i want 11whtespaces first and 3001339 value in my ID_SA_SOURCE variable....

CAn you pleasse check this