[psas-software] Script help please
jay1
jay at BeckFamily.com
Tue Nov 1 16:44:12 PST 2005
When I make the suggested change to the script I get:
jay at rocket:~/bin$ cat smData2 | ./exp2
sed Regular Expression is: -->s/ \t//g<--
sed² -e expression #1, char 2: unterminated `s¹ command
jay at rocket:~/bin$
>>> Jason Holt < jason at lunkwill.org > on 11/1/05 4:16 PM wrote <<<
>
> On Tue, 1 Nov 2005, Jay Beck wrote:
>
>> > REGEXP="'s/ \t//g'"
>> >
>> > echo "sed Regular Expression is: -->"$REGEXP"<--"
>> >
>> > sed $REGEXP
>> >
>> > jay at rocket:~/bin$ cat smData2 | ./exp2
>> > sed Regular Expression is: -->'s/ \t//g'<--
>> > sed: -e expression #1, char 1: unknown command: `''
>> > jay at rocket:~/bin$
>> > can anyone explain why the script acts different and correct it?
>
> You're doubly quoting the string, so the ' stays in. Try:
>
> REGEXP='s/ \t//g'
>
> -J
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.psas.pdx.edu/pipermail/psas-avionics/attachments/20051101/aeef9474/attachment.htm>
More information about the psas-avionics
mailing list