[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Files: Debian-to-dos.



On Thu, 26 Aug 1999 vw@geus.DK wrote:

> Is there a way to save a linux-file to a dos-diskette in a dos-readable way?
> (Say I wanted to show you guys a config-file or something when I'm mailing
> from an NT-box, not wanting to type the whole thing, or I wanted to take a
> file from f. x. StarOffice with me to work...)
> Please don't flame a pitiful 'nix newbie. I'm really trying to learn, and I
> already love the efficiency of linux compared to my horrible WinNT box at
> work (breaks down several times a day...)
> Regards
> Vitux
> 
> 
Vitux,

	A one-line solution with no special programs required would be :

sed 's/$/control-v followed by control-m/' filename > output_file  

	This would convert from Unix format to DOS format. The reverse
operation would be acomplished by :

sed 's/control-v followed by control-m$//' filename > output_file

(The '$' is literally present in both cases)

Regards,
Jor-el

He who is intoxicated with wine will be sober again in the course of the
night, but he who is intoxicated by the cupbearer will not recover his
senses until the day of judgement.
		-- Saadi


Reply to: