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 -->
  #7 (permalink)  
Old 02-11-2009
stanleypane stanleypane is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 23
Sorry, I've made some slight changes to your script:

Code:
set LASInputFile = `ls *.[Ll][Aa][Ss] | head -1`
echo $LASInputFile
set j=1
while ($j <= 100)
set line="`cat $LASInputFile | head -$j | tail -1`"
@ j = $j + 1
echo "$line"
end
I put quotes around the "set line" and "echo" portions of the script. This will stop the shell from evaluating ~VERSION as if it was a home directory.