Subject: | |
From: | |
Reply To: | |
Date: | Thu, 21 Jul 2011 10:10:30 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
It's possible the mpe version of sed (which is old) is causing the problem. (I would take anything you can do on *nix
with a grain of salt when trying to do the same on mpe (especially Linux which is likely far newer))
This thread discusses it: http://www.unix.com/unix-dummies-questions-answers/77649-change-specific-line-file.html
Following the thread's example I made a file called test. Here you can see it from inside the posix shell:
/DONNA/PUB $ cat TEST
coo
coo
ca
choo
and running sed:
/DONNA/PUB $ sed '1c\
> koo ' TEST
koo
coo
ca
choo
so, it seems to me that you need a newline between the two lines. I'm not exactly sure what you need to do to get it
all to work from the CI.
Having said all that -- if all that you're wanting to do is change the 1st line in a file, why not use standard mpe
methods? Editor? Qedit? Fcopy? - d
---
Donna Hofmeister
Allegro Consultants, Inc.
408-252-2330
> -----Original Message-----
> From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of James B. Byrne
> Sent: Thursday, July 21, 2011 9:44 AM
> To: [log in to unmask]
> Subject: [HP3000-L] Posix sed command from MPEiX
>
> I am trying to run the POSIX sed command from the MPE shell. I do
> this:
>
> SED;INFO=" '1c\ another one' INFILE" > OUTFILE
>
> and get this error:
>
> sed: "\" must terminate the "c" command
>
> Which is sort of perplexing me. What am I doing wrong?
>
>
> --
> *** E-Mail is NOT a SECURE channel ***
> James B. Byrne mailto:[log in to unmask]
> Harte & Lyne Limited http://www.harte-lyne.ca
> 9 Brockley Drive vox: +1 905 561 1241
> Hamilton, Ontario fax: +1 905 561 0757
> Canada L8E 3C3
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|