txt files in windows won't work in linux

john smith no at thanks.com
Sat Nov 30 18:38:26 PST 2002


"James Drabb" <JDrabb at tampabay.rr.com> wrote in message
news:20021130095821.00007711.JDrabb at tampabay.rr.com...
> On Sat, 30 Nov 2002 17:28:17 +1100
> "john smith" <no at thanks.com> wrote:
>
> > hello.
> > I'm using my windows computer to browse the blfs book and download
> > packages. I then use samba on the lfs system to transfer what I need.
> >
> > My vi skills are pretty poor and  rather than type all my init scripts
> > out I would like to copy and paste to a text file while in windows and
> > then copy this over to the lfs system.
>
> You can copy and past under Linux using many methods.  From X you can
> select text and then press the middle button to paste.  If you have a
> wheel, just press the wheel.  If you only have two button with no wheel,
> press both buttons at the same time.
>
> > I have tried this and although the script files look normal from cat
> > they never work complaining about "command not found" and other errors
> > like that.
>
> This is because they are in windows cr/lf format.  You can either use a
> good windows editor like textpad and save in unix format or you need to
> convert them on Linux.  To convert them you can use vim like so:
>
> 1.  Open the file in vim
> 2.  Press :
> 3.  Type set ff=unix <enter>
> 4.  Press :
> 5.  Type wq <enter>
> 6.  Repeat as needed.
>
> Or Get dos2unix (search freshmeat.net) and just do a dos2unix -u * to
> convert all file in a directory.
>
> Jim Drabb

Thanks Jim.
Will remember that one.  If I had a man/info page for vi I may have come
across that one.
Anyone know if there is a way to get sed to stip out these characters

thankyou
gavin



-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list