Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tlug: sed ?
- To: tlug@example.com
- Subject: Re: tlug: sed ?
- From: Jason Molenda <crash@example.com>
- Date: Wed, 23 Apr 1997 17:40:16 +0900 (JST)
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=US-ASCII
- In-Reply-To: <XFMail.970423172550.schweiz@example.com> from "Jim Schweizer" at Apr 23, 97 05:11:26 pm
- Reply-To: tlug@example.com
- Sender: owner-tlug
-------------------------------------------------------- tlug note from Jason Molenda <crash@example.com> -------------------------------------------------------- > if: Expression Syntax. > This doesn't sound correct. Looking at the script (just a visual once-over), I see no syntax errors. Just to confirm, the entire script should read (okay, I diddled a little to make it better :-), but I didn't change anything significant). ------------------------------------------ #! /bin/sh if [ $# -ne 3 ] then echo Usage: `basename $0` pattern replacement file exit 1 fi if [ ! -f "$3" ] then echo `basename $0`: $3 is not a file exit 1 fi pattern="$1" replacement="$2" file="$3" A="`echo | tr '\012' '\001'`" sed -e "s$A$pattern$A$replacement$A" $file exit 0 ------------------------------------------ If you're getting the error message above, the way to debug it is to run it like "sh -x gres a b c". This will make the Bourne shell print out what it is doing for every command it executes. If you don't care about it, that's OK, but it should work. If it isn't, I would be a little concerned that something is wrong with your OS. Jason ----------------------------------------------------------------- a word from the sponsor will appear below ----------------------------------------------------------------- The TLUG mailing list is proudly sponsored by TWICS - Japan's First Public-Access Internet System. Now offering 20,000 yen/year flat rate Internet access with no time charges. Full line of corporate Internet and intranet products are available. info@example.com Tel: 03-3351-5977 Fax: 03-3353-6096
- Follow-Ups:
- Re: tlug: sed ?
- From: Jim Schweizer <schweiz@example.com>
- References:
- Re: tlug: sed ?
- From: Jim Schweizer <schweiz@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tlug: sed ?
- Next by Date: Re: tlug: sed ?
- Prev by thread: Re: tlug: sed ?
- Next by thread: Re: tlug: sed ?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links