I'm running into a slight quandary with this particular script I need. I have a used egrep to yank from a large number of config files the location parameter of various unity databases. I have that information in a script. For example, the data looks like:
So, the problem is each location doesn't have a particular field I can cut with "/" as the delimiter, however, the second to last field in that string is what I want: demo and ss. Is there an easy way to script this. I want to basically spin through this flat file (290 lines), in a new file print out the complete path and then on the same line separated by a space the second to last field. The end result would look like:
Thanks for the help! asked 20 Sep '10, 01:28 Andy |