Re: how to fix a unix shell script to work on linux

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Josef Lowder
Date:  
To: Main PLUG discussion list
Subject: Re: how to fix a unix shell script to work on linux
.
Thanks Matrix Mole (and all other responders).
The scripts you provided worked fine.
'preciate it!

Joe

------------------
On Sat, 12 Jan 2008, Matrix Mole wrote
> Josef Lowder wrote:
> | .
> | The following script used to work on my old unix system,
> | to remove blank lines from a text file. It no longer works
> | on linux, but now it gives an error message (below):
> |
> | sed '/[!-~]/!d' $1
> |
> |
> | This is the error message:
> |
> | sed: -e expression #1, char 7: Invalid range end
> |
> | How can I fix this?
>
> If we're talking lines that have no content in them whatsoever then the
> following should work:
>
> sed -e '/^$/d' $1
>
> If we're talking lines that have at least a space on them but nothing
> else, then I'd think should work:
>
> sed -e '/^\ *$/d' $1
>
> I haven't had a chance to test these, but I think that should work (and
> might even work on a unix platform as well as linux).
>
> Matrix Mole



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss