Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with Using Head in a script.

Status
Not open for further replies.

millsra

MIS
Jun 25, 2002
43
US
I am new to scripting so I appreiciate any help that I can get. I am under the gun right now and this is the last part to get this to work.

$len is equal to the number of entries in a file minus the newest entry.
I am trying to use my variable of $len in my head command. Something is not right here but I can not figure it out. Maybe I have been beating my head agaist a wall too long that it all looks the same right now.

head -n '-${len}' /usr/local/emc/util/tmp


Any assistance would be appriecaiatd.

 
Why using single quotes that prevent shell expansion ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top