[ale] dos file in linux?? WTF?
Cadet Hacker
linux at cade.org
Fri Dec 14 12:47:38 EST 2001
instead of running dos2unix can't you just open up the dos file in vim and
type :set fileformat=unix ? Is this a true statments? It always seemed to
work for me.
--cade
=========================
On Linux vs Windows --
Remember amateurs built the ark - professionals built the Titanic
=========================
On Wed, 12 Dec 2001, Geoffrey wrote:
> tewkewl at mindspring.com wrote:
> >
> > You guys were absolutely right. I compiled dos2unix and ran it on the file and presto changeo, the file magicaly shrunk! (I can only assume it took the linfeeds out. and the script runs fine now...
> >
> > now if somebody can explain to me why the hell bash cares enough about linefeeds to tell me the file doesn't exist when it plainly does! :)
>
> I was late in on this one, but the error is complaining because it can
> find the #! command at the top of the script, because the extra chars
> changed what the shell sees as the shell the script should be executed
> with. You'd see the same error if you had a script like:
>
> #!/bin/foo-sh
>
> date
>
> That is, as long as /bin/foo-sh doesn't exist.
>
> The error is complaining that it can't find /bin/foo-sh
>
> >
> > -Patrick
> >
> > Michael Golden <naugrimk at yahoo.com> wrote:
> > > On Wed, 2001-12-12 at 18:14, tewkewl at mindspring.com wrote:
> > > Hey guys...
> > >
> > > How does linux/vi know that a file is considered to be a 'dos' file?
> > > it really never was a dos file...it was a script written on an hp box...but during the move (tar/zip) when we run it on linux, it reports "bash: ./secng.sh: No such file or directory"
> > >
> > > when the file is plainly there and with execute permissions.
> > >
> > > when I VI the file, vi reports [DOS] at the bottom where it has the file name. Anybody have a clue?
> >
> > My only guess on how it could do that is to check whether lines end with
> > just CR or CR/LF. You can use the dos2unix utility to fix that if that
> > is the problem. If that's not it then I don't know. :-/
> >
> > Michael
> >
> > ---
> > This message has been sent through the ALE general discussion list.
> > See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> > sent to listmaster at ale dot org.
> >
> > ---
> > This message has been sent through the ALE general discussion list.
> > See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> > sent to listmaster at ale dot org.
>
> --
> Until later: Geoffrey esoteric at denali.atlnet.com
>
> "...the system (Microsoft passport) carries significant risks to users
> that
> are not made adequately clear in the technical documentation available."
> - David P. Kormann and Aviel D. Rubin, AT&T Labs - Research
> - http://www.avirubin.com/passport.html
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
> sent to listmaster at ale dot org.
>
>
--
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list