Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Vanishing files ?
- X-seq: zsh-users 10339
- From: Anssi Saari <as@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Vanishing files ?
- Date: Mon, 29 May 2006 10:57:22 +0300
- In-reply-to: <060528113200.ZM31855@xxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Anssi Saari <as@xxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060528.172405.74744323.Meino.Cramer@xxxxxx> <060528113200.ZM31855@xxxxxxxxxxxxxxxxxxxxxx>
On Sun, May 28, 2006 at 11:32:00AM -0700, Bart Schaefer wrote:
> On May 28, 5:24pm, Meino Christian Cramer wrote:
> }
> } Why can I execute the contents of the script "tempwatch" but not the
> } script itsself?
>
> That usually means that the program named in the #! line is not where
> the path in that line says it is.
Now that we're on the topic, I think bash does this a little better. If you have an
invalid interpreter, it tells you, like this:
bash: ./foo: /bin/foo: bad interpreter: No such file or directory
Maybe this could be improved with zsh?
> } By the way: Does anyone know a trick how to remove _all_
> } Escape-Sequences from a script generated by the command "script" ...
>
> sed "s/[^"$'\t '"-~]//g"
>
> The order of tab and space in $'\t ' is important. The above actually
> strips anything that's not printable ASCII, so if you're using an ISO
> character set you probably need to put more stuff inside the [ ].
That doesn't really work for escape sequences now does it? For example, on
this machine, my prompt under script is shown in less like this:
^MESC[m^OESC[mESC[mESC[Jkuori% ESC[Kls^M
That sed removes the ^M and escapes, but what it leaves behind is
[m[m[m[Jkuori% [K
Messages sorted by:
Reverse Date,
Date,
Thread,
Author