![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Piping in UNIX | simo007 | UNIX for Dummies Questions & Answers | 3 | 05-23-2007 03:40 AM |
| Help with piping program | PuppyHusher | High Level Programming | 3 | 03-30-2007 01:26 PM |
| piping | lnatz | Shell Programming and Scripting | 1 | 07-14-2006 03:30 AM |
| Help (Piping ls, tr, cut) | scan | Shell Programming and Scripting | 2 | 02-11-2006 08:40 AM |
| Tar and gunzip piping | madyodacolon | Shell Programming and Scripting | 2 | 05-11-2004 11:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Piping to ex from a script
Is anyone piping commands to ex from scripts? I.E. Code:
echo '%s/change this/to that/\nwq' | ex file.name I've been using it for years with AIX, Solaris, SGI, with variations ksh and Mandriva and others with pdksh. I've just started using CentOS with ksh and it no longer works. I've tried single quotes double, etc... I've also tried using other shells to no avail. zsh does work, but I don't know how compatible the rest of my scripting would be with it. I know that Mandriva uses pdksh and CentOS is using AT&T korn shell. I know that there are differences between the two, such as returning variables from subroutines, etc... I use this type of file manipulation a lot. It's very convenient to be able to change a file without having to create an intermediate file like you would with sed. Any ideas on why something this simple won't work with AT&T's ksh, or what I need to do to get it working? Or, should I just give in and switch to zsh for the scripts that use ex? Thanks in Advance. |
|
||||
|
If only all of life were that easy
I guess I was looking so hard at the format of the echo statement, I didn't see that it could have been the problem!!! As I read that I heard a very loud "POP" I think it might of been my head coming out of my tail...
![]() But Like I always say... "I'd rather have a bottle in front of me than a frontal lobotomy!" Thanks a bunch. P.S. The printf didn't work. echo -e did. Last edited by mph; 10-12-2007 at 10:43 AM.. Reason: update |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|