The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #3 (permalink)  
Old 01-28-2008
nvenkat010 nvenkat010 is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 3
Question

Thanks a lot for your efforts and time.

Rather i tried with the printf arguments earlier but rather did not workout.

I re-directed the output of the command to file and when i opened the file i could not see any spaces,even with se list option.

recs=`wc -l PCPC.DXDINPT.FA0.INPUTFLE.PASS|cut -c1-9`;export recs;echo 'PCPC.DXDINPT.FA0.INPUTFLE.PASS'`date +%Y%m%d``printf '%015d%-200s\n' $recs`


Output:
PCPC.DXDINPT.FA0.INPUTFLE.PASS20080128000000000000101$

Where $ representing the end of line.

Can you provide me some more suggestions