home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!orcenl!rgasch
- From: rgasch@nl.oracle.com (Robert Gasch)
- Newsgroups: comp.unix.shell
- Subject: Sed with shell variables
- Message-ID: <2701@nlsun1.oracle.nl>
- Date: 20 Aug 92 08:04:07 GMT
- Organization: Oracle Europe
- Lines: 15
-
- Using sed to edit strings is usually a nice and practical
- method of doing so. I you want to change a pattern you usually
- say:
- echo $something|sed 's/pattern1/pattern2/'
-
- 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??
-
- Thanks a lot
- ---> Rob
-
-