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

Re: Vanishing files ?



From: DervishD <zsh@xxxxxxxxxxxx>
Subject: Re: Vanishing files ?
Date: Mon, 29 May 2006 08:11:19 +0200

Hi Raúl,

 the problem has been solved in between:
 The thing is, that vim and Microemacs are a little too smart as to be 
 helpful in this special case (and I myself didn't know that ;)

 My first line of the script was

 #!/bin/zsh^M

 and an interpreter with the name 'zsh^M' does not exist on my system.

 BANG!

 But the '^M' wasn't visible to me, since vim and Microemacs both
 recognized that file as to be "DOS-borne" and switches into DOS-mode
 internally. Vim and Microemacs have special modes to display
 all non-printable characters and would (as I thought in that moment) 
 display a stray ^M if switched to that mode.

 BUT they were als in DOS-mode, which means a ^M isn't a stray
 character but one half of the end of line in DOS mode (CR/LF instead
 of LF)

 So I only saw a "#!/bin/zsh$", which looks ok.

 The swiss army knife in this case was "cat". Cat doesn't know
 anything about DOS/UNIX or whatever. It simply pull everything 
 into visibility when called as "cat -v".

 And then there were light... ;O))

 Keep hacking and thanks a lot for your help!
 Meino
 


>     Hi Meino :)
> 
>  * Meino Christian Cramer <Meino.Cramer@xxxxxx> dixit:
> > >  * Meino Christian Cramer <Meino.Cramer@xxxxxx> dixit:
> > > >  Why can I execute the contents of the script "tempwatch" but not the
> > > >  script itsself?
> > > 
> > >     Probably because you don't have read or execute permissions for
> > > the script :?? You can execute the contents because you're entering
> > > them in the command line, but that has nothing to do with the
> > > problem you have.
> > 
> > 
> >   Hmmm...I did a 
> > 
> >     solfire:/home/mccramer>ls -l  bin/tmepwatch
> >     -rwxr-xr-x 1 mccramer users 79 May 28 20:36 bin/tmepwatch
> >     solfire:/home/mccramer>
> > 
> >  and it seems to be an X-file ;)
> 
>     It is!. Well, then the problem is probably that the first line of
> the script doesn't contain a valid interpreter. Could you please post
> the first line of bin/tmepwatch?
> 
>     Raúl Núñez de Arenas Coronado
> 
> -- 
> Linux Registered User 88736 | http://www.dervishd.net
> http://www.pleyades.net & http://www.gotesdelluna.net
> It's my PC and I'll cry if I want to... RAmen!
> 


Messages sorted by: Reverse Date, Date, Thread, Author