sed command spanning multiple lines
- From: "Russell L. Harris" <rlharris@xxxxxxxxxx>
- Date: Wed, 11 Apr 2007 12:22:16 -0500
Is it possible to spread a sed command over multiple lines, to improve
readability (for the sake of future maintenance)? If so, what
character is used to break the line and what are the rules?
For example, I would like to re-write the command:
sed -e 's/\.//g' -e 's/\,//g' -e 's/\\//g' "$1" | sort -u > foo
as:
sed -e 's/\.//g'
-e 's/\,//g'
-e 's/\\//g' "$1"
| sort -u > foo
and be able to add additional lines such as:
-e 's/[0-9]//g'
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: sed command spanning multiple lines
- From: Andrew Sackville-West
- Re: sed command spanning multiple lines
- From: Cédric Lucantis
- Re: sed command spanning multiple lines
- From: Cédric Lucantis
- Re: sed command spanning multiple lines
- From: Björn Keil
- Re: sed command spanning multiple lines
- Prev by Date: Re: IBM x346
- Next by Date: Re: Creating debian package with ar
- Previous by thread: Problem downloading Debian DVDs...
- Next by thread: Re: sed command spanning multiple lines
- Index(es):
Relevant Pages
|
|