Article View: comp.unix.shell
Article #4149Re: A very simple question on SED or AWK for a GURU, and an enjoyable problem
From: gnuist006
Date: Tue, 14 Jan 2003 08:19
Date: Tue, 14 Jan 2003 08:19
39 lines
2443 bytes
2443 bytes
The main group for followup to this is: comp.unix.shell. I hope that I have the relevant groups for cross-posting. ---- Even though the problem posed in this thread is still *** UNSOLVED *** let me extend my gratitude to Mr Dragan and Mr Yuan for their kind attempts to answer this. I hope that someone is able to put more helpful replies tonight. Mr Dragan's reply of grep+tr is actually misleading as concurred by Mr Yuan. Dr Yuan's reply uses perl which is not familar to me and I would appreciate a solution that is based on bash, sed and awk since that is what I can take and modify at this time. Note, I CAN write a wrapper loop in bash and I just need proof of concept for one file processing in this fashion cat file | sed or awk | sed or awk | and so on. However, since we are making a replacement within a pattern, I do not think only grep+tr would help. I would work to understand a sed solution even if involves shuttling back and forth data from the pattern space to the holding space. Thanks a lot and do not forget to have fun working on this problem. It is a little out of the way. Gnuist
Technical Details
Message-ID:
<b00bb831.0301140019.31793f76@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailReferences:
<b00bb831.0301131459.4a605c9b@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ad19,1c7b99c7287cd4c7 X-Google-Attributes: gid10ad19,public X-Google-Thread: f8c9b,fef69cdb97e337e6,start X-Google-Attributes: gidf8c9b,public X-Google-Thread: 109f73,fef69cdb97e337e6,start X-Google-Attributes: gid109f73,public X-Google-Thread: fc89c,1c7b99c7287cd4c7 X-Google-Attributes: gidfc89c,public X-Google-Thread: 1012a6,1c7b99c7287cd4c7 X-Google-Attributes: gid1012a6,public X-Google-ArrivalTime: 2003-01-14 00:22:27 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: gnuist006@hotmail.com (gnuist006) Newsgroups: comp.unix.shell,comp.lang.awk,comp.unix.programmer,gnu.utils.help,comp.unix.questions Subject: Re: A very simple question on SED or AWK for a GURU, and an enjoyable problem Date: 14 Jan 2003 00:19:52 -0800 Organization: http://groups.google.com/ Lines: 39 Message-ID: <b00bb831.0301140019.31793f76@posting.google.com> References: <b00bb831.0301131459.4a605c9b@posting.google.com> NNTP-Posting-Host: 209.178.179.185 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1042532392 5376 127.0.0.1 (14 Jan 2003 08:19:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 14 Jan 2003 08:19:52 GMT