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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help!!

Status
Not open for further replies.

Travis1243

Technical User
May 20, 2003
1
CA
Hey, I am programming a small script for Solaris in my Unix class at school.. I am building a program that times runners..

Anyway, I am trying to assign a value to a variable using the awk command..

mine is set up like this

set starttime = `awk 'NR == 4 {print $0}' $1`

the $1 being the filename..

This gives me an error, saying it cannot open starttime..

Anyone have any idea what I am doing wrong here? Any help would be greatly appriciated..

THanks

Travis

 
What shell are you using?

If you're using a Korn shell, you would do it like this...
[tt]
export STARTTIME=`awk 'NR == 4 {print $0}' $1`
[/tt]
Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top