From: "Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: A very simple question on SED or AWK for a GURU, possibly a lisp script or emacs batch processing of many files
Date: 14 Jan 2003 14:34:02 -0500 [thread overview]
Message-ID: <5llm1ncyqd.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: uadi34mue.fsf@lksejb.lks.agilent.com
>>>>> "ericjb" == ericjb <ericjb@lksejb.lks.agilent.com> writes:
>> Here is the type of lines I have in a file:
>> junk label="junk1/junk2/junk3/.../junkn/" more junk
>> I want to find every line that has
>> label="..."
>> pattern
>> and then I want to replace every / by _ inside the
>> quotes.
sed '/label=".*"/s|/|_/'
>> cat file |
>> sed commands |
>> awk commands |
I don't know if the Useless Use of Cat Award is still up for grabs,
so I'd recommend you don't bother running for it and just use
redirection instead:
sed commands <file |
awk commands |
-- Stefan
PS: This has nothing to do with Lisp, Emacs, or GNU, so I redirected
the discussion to comp.unix.shell.
next prev parent reply other threads:[~2003-01-14 19:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-14 0:03 A very simple question on SED or AWK for a GURU, possibly a lisp script or emacs batch processing of many files gnuist006
2003-01-14 3:46 ` Christopher J. White
2003-01-14 7:13 ` Friedrich Dominicus
2003-01-14 8:42 ` gnuist006
2003-01-14 10:23 ` Friedrich Dominicus
2003-01-14 22:10 ` Wayne Throop
2003-01-14 18:18 ` ericjb
2003-01-14 19:34 ` Stefan Monnier <foo@acm.com> [this message]
2003-01-14 22:54 ` Alan Mackenzie
2003-01-14 23:19 ` Kaz Kylheku
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5llm1ncyqd.fsf@rum.cs.yale.edu \
--to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).