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!

Script flow control

Status
Not open for further replies.

lambic

Technical User
Nov 28, 2002
68
GB
Hi,

Think this is a simple question (I hope!).
I have a script which needs to process an input file. It needs to determine what to do with the file based upon the value of the last field in the file. The file is a fixed-length format (no field separators. The field is consistent thoughout the file (i.e will contain the same value on each record).
So, I need to test the first record, if the field contains 40 or 41, do 1 thing, otherwise do something else. How can I do this?

I'm sure it's easy!

Many Thanks for any advice (from a UNIX scripting novice!)[morning]
 
Thanks for the tip PH. Have now sorted my problem!

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top