home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!fitzgb
- From: fitzgb@mml0.meche.rpi.edu (Brian Fitzgerald)
- Subject: Re: here document in a shell script
- Message-ID: <1#-ymnq@rpi.edu>
- Nntp-Posting-Host: mml0.meche.rpi.edu
- Organization: Rensselaer Polytechnic Institute, Troy, NY
- References: <1992Aug11.200320.3202@cbnewsm.cb.att.com> <5z+yk0m@rpi.edu>
- Date: Wed, 12 Aug 1992 12:47:15 GMT
- Lines: 22
-
- I write:
- >
- >ed - test3 <<!
- >g/^/s/ffffcu/xxxxcu/
- >g/^/s/8881112222/8881119999/
- >w testx
- >q
- >!
-
- By the way, sed can be used:
-
- sed 's/ffffcu/xxxxcu/g
- s/8881112222/8881119999/' test3 > testx
-
- or sed -f sf test3 > testx
-
- where sf is
-
- s/ffffcu/xxxxcu/g
- s/8881112222/8881119999/
-
- Brian
-