Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Vanishing files ?



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