unix ksh: script needs to read values from external file into variables
HPUX / ksh
In a script I need to create variables with values extracted from the DESCRIPTION with is attached to a CPUNAME (see 'input file' below for example).
The command would need to search for a certain CPUNAME in the file then:
1) from the line under it extract first value of the description, for instance [ R3 ]
2) extract second value of the description, for instance [ HR ]
The values are seperated by a dash [-].
#Example (sample input file is below)
CPUNAME to search for would be HT0016P
CATEGORY=[as described under 1) above ]
SUBCATEGORY=[as described under 2) above ]
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.