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

Need to read output of file into variable

Status
Not open for further replies.

maxcrook

Programmer
Jan 25, 2001
210
GB
I have a script that checks for duplicate entries of tape numbers on a server the output is sent to a file with the results looking like so:

123456 2

Showing that the tape has 2 entries (counted by uniq -c)
However I want to now display the servers that this tape came from.Therefore I need to read the tape number in as a variable so the script can then output:

123456 2 Server1 Server2

Hope ive explained what I want to do properly.
 
In your shell man page pay attention to the read builtin

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top