SCO OpenServer 5.0.7 - SED Question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting SCO OpenServer 5.0.7 - SED Question
# 1  
Old 05-04-2010
SCO OpenServer 5.0.7 - SED Question

Hi all,

I'm having some problems with a SED command that works with CentOS 5 Linux, but NOT SCO OpenServer.

I've looked at the MAN pages on SCO for SED, but cannot seem to figure out what I'm doing wrong.

What I'm trying to do is, look for the key phrase "Net Amount Due", then delete the next 6 lines;

sed -e '/Net Amount Due/{p;N;N;N;N;N;N;d}'

I get the following error:

cat filetest.prn.orig | sed -e '/Net Amount Due/{p;N;N;N;N;N;N;d}'
sed: Command garbled: /Net Amount Due/{p;N;N;N;N;N;N;d}

Any assistance is much appreciated...
# 2  
Old 05-04-2010
Hello, stlouis:

That command wouldn't work on most sed implementations that I've used, gnu sed being the exception (which is very likely what your CentOS system uses):

Try it with a semicolon after the delete command:
Code:
sed -e '/Net Amount Due/{p;N;N;N;N;N;N;d;}'

Regards and welcome to the forum,
Alister
# 3  
Old 05-04-2010
Might be a required trailing semicolon:
Code:
cat filetest.prn.orig | sed -e '/Net Amount Due/{p;N;N;N;N;N;N;d;}'


Last edited by jlliagre; 05-04-2010 at 12:57 PM.. Reason: Ouch, I was slow ...
# 4  
Old 05-04-2010
Thank-You...

It was the missing semicolon (Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

SCO OpenServer 5 Will Not Boot

We have a legacy system that runs on SCO OpenServer 5.0.6, and I've rebuilt the server a couple of times so we can have access to old historical data. That system suddenly went offline for no known reason, and I know that the configuration has not been altered, there is nobody with access to the... (63 Replies)
Discussion started by: spock9458
63 Replies

2. SCO

Need help to install sco openserver 5

Hi, Im installing sco openserver 5 (OpenServer-5.0.7Hw-10Jun05_1800.iso) on a vmware server 1.0.4. Installation is ok but on when x server is loading i just can login, mouse does not move and most of keyboard cases do not respond. I choose usb mouse + french keyboard while installating, should i... (1 Reply)
Discussion started by: sup69
1 Replies

3. SCO

I need SCO Openserver 4.2!!!!

I need SCO Openserver 4.2. Please, give me distributive of that version SCO:eek: (0 Replies)
Discussion started by: caine
0 Replies

4. SCO

sco openserver 5.0.7

Dear members when i installed dual processor patch in openserver 5.0.7 in hp ML370 G4 server it hangs in sco at G_hd_config. i tried MP4, EFS 5.64,5.70A but not solved the problem.. (0 Replies)
Discussion started by: M_farooqui
0 Replies

5. UNIX for Dummies Questions & Answers

SCO Openserver 6.0

Hi guys, I just got this new 6.0 version and i'm trying to setup a remote office to telnet to this server running sco 6.0, in previous version all i have to do is add this file under /etc/rc2.d call S99route and put the gate in that file and that was it, for some reason in 6.0 it does not... (1 Reply)
Discussion started by: josramon
1 Replies

6. UNIX for Dummies Questions & Answers

SCO Openserver 6.0

Hi there guys. I just got this new SCO version and i'm having some problem printing from shell, This is what i'm typing at the # sign : lp -dHP /etc/hosts and it prints no problem but when i use any other user at the $ sign it gives me this error. /dev/fd/7: /usr/lib/lp/sysv/7: not found. ... (1 Reply)
Discussion started by: josramon
1 Replies

7. UNIX for Dummies Questions & Answers

SCO OpenServer 5 question

Hello, I have searched the web for a couple hours now and have found no results, and I cam across the site and thought, "Why not?" In the office that I work, we run an old SCO OpenServer 5.5 box. We are just about to open a branch that needs to connect to that server, but we do not know how... (3 Replies)
Discussion started by: czimmerman
3 Replies

8. UNIX for Advanced & Expert Users

SCO 5.0.2 openserver

I am doing some work for a customer that is running SCO 5.0.2 openserver and they have lost their cd. Is there anyplace I can download it? I have a replacement being shipped but it will not be here for two days and they are down. Any ideals? (3 Replies)
Discussion started by: SCOoT
3 Replies

9. UNIX for Dummies Questions & Answers

sco openserver 5.5

hello! when i try to make my system dual boot with both win98 & sco open server 5.5 it doesn't work at all.neither win98 take start nor sco open server boots.what should i do ? kindly help me thanks (1 Reply)
Discussion started by: buntty
1 Replies

10. UNIX for Dummies Questions & Answers

Help For SCO OpenServer

I've just installed Unix SCO OpenServer System v in an Intel PC and Everithing ok, except just one thing, in the begining of the installation the wizard asked me about the mouse , i have a generic 3 buttons mouse and i took a logitech and did not work i need to change the mouse configuration, ... (2 Replies)
Discussion started by: jimmyvaldes
2 Replies
Login or Register to Ask a Question