[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Bash Script Help



Fred L Youhanaie wrote:


Hi Colin,

I have had to deal with this sort of things on quite a number of occasions, and I have my own little perl script, which is very similar to Paul's, mine came straight out of the perl cookbook ;-)

If you replace Paul's last print statement with:

    print join('|', @fields), $/;

you will end up with a filter that produces a '|'-separated file, which can then be processed with shell/awk/cut etc., or whatever your users are comfortable with.

I'll have to look into this some more when I have time. A script like this could be very useful for preparing the formated output from the program in question. Everyone could just run their data through this script and then modify some awk commands to get the fields of their choice. Thanks Fred and Paul for the suggestions.





Reply to: