home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
- Newsgroups: comp.unix.shell
- Subject: Re: Sed with shell variables
- Message-ID: <1992Aug20.105737.29473@ccu1.aukuni.ac.nz>
- From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
- Date: Thu, 20 Aug 1992 10:57:37 GMT
- References: <2701@nlsun1.oracle.nl>
- Organization: University of Auckland, New Zealand.
- Lines: 14
-
- rgasch@nl.oracle.com (Robert Gasch) writes:
-
- >The problem I ran into is that I can't get shell variables to
- >work as arguments. When I type
- > echo $something|sed 's/$this_pattern_var/$that_pattern_var/'
-
- >sed throws up on me. I've tried various combinations of quotation
- >marks without success. Is there an easy way of doing this??
-
- echo $something | sed -e s/$this_pattern/$that_pattern/
- --
- Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
- The joy of engineering is to find a straight line on a double logarithmic
- diagram.
-