Subject: RE: Help with Win -> NetBSD text files...
To: 'Matthias Buelow' <mkb@mukappabeta.de>
From: David Woyciesjes <DAW@yalepress3.unipress.yale.edu>
List: netbsd-help
Date: 03/19/2001 14:10:30
Thanks for the info. I think, for now, I'll use the command option you
mentioned, which is...
[Shift]+[;]
...then on the command line...
1,$s/[Ctrl-V][Ctrl-M]$//
...then hit [Enter] to execute, right?
Thanks again...
--- David A Woyciesjes
--- C & IS Support Specialist
--- Yale University Press
--- mailto:david.woyciesjes@yale.edu
--- (203) 432-0953
--- ICQ # - 905818
-> -----Original Message-----
-> From: Matthias Buelow [mailto:mkb@mukappabeta.de]
-> Sent: Monday, March 19, 2001 1:48 PM
-> To: David Woyciesjes
-> Cc: netbsd-help@netbsd.org
-> Subject: Re: Help with Win -> NetBSD text files...
->
->
-> David Woyciesjes <DAW@yalepress3.unipress.yale.edu> writes:
->
-> >Under Linux, you can use the command
-> ># mount -o conv=auto -t msdos /dev/fd0a /mnt
-> >which will automatically convert the CR-LF to a newline at
-> the ends of lines
-> >in a text file.
->
-> uh.. how does the filesystem decide which file on the floppy
-> contains text,
-> or which parts of a file are text, and which isn't etc.?
-> Last time I looked,
-> DOS didn't have file types.
->
-> >How can this be done for NetBSD? Or should I use some other
-> program on
-> >Windoze, (other than Notepad or Wordpad) for editing files
-> destined for my
-> >NetBSD system?
->
-> There are several ports of Unix editors to MSDOS (and
-> WinNT/3.11/95/98/etc)
-> and of course there are tools like Gnu recode (in pkgsrc)
-> which convert
-> from many character sets to many character sets. The latter
-> is probably
-> your tool of choice -- if you have installed recode, you
-> could for example
-> make a shell alias (or put it into a script file) "dos2unix" which
-> invokes "recode ibmpc..lat1".
->
-> >The '^M' at the end of each line isn't bad when the file
-> has only 10 lines
-> >or so, but gets *really* annoying with bigger files...
->
-> Well, if you just want to get rid of that, apart from using
-> tools like
-> recode, you could of course use tr, sed, ed, or vi to remove
-> the trailing
-> ^Ms in a bulk operation (like 1,$s/^M$// (^M being Ctrl+M,
-> inserted via
-> Ctrl+V Ctrl+M here of course)) but if you have to do this more often,
-> a converter like recode is recommended.
->
-> I also expect there are native windows editors (apart from
-> Unix ports)
-> that can save in Unix-style ASCII text but I can't name any
-> right now.
->
-> mkb
->