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 -->
  #1 (permalink)  
Old 05-30-2007
rinku rinku is offline
Registered User
  
 

Join Date: May 2007
Posts: 54
Truncate File contain

I have one file which first line is blank and second line has some data.
$cat filename
output:

30-MAY-07
I want to store 30-MAY-07 value in one variable.
for that I wrote
var="`head -2 filename`"
It will give that result but I want to truncate the first line which is blank.

plz help.