[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sylpheed
Subject:    [sylpheed:22338] Re: How to convert from linux to dos before
From:       Dennis Carr <ke6isf () spamcop ! net>
Date:       2004-02-14 2:51:09
Message-ID: 20040213185109.4d5ae512.ke6isf () spamcop ! net
[Download RAW message or body]

On Fri, 13 Feb 2004 14:15:19 +0100
Zaino Marco <marco.zaino@mfn.unipmn.it> wrote:

> My printer doesn't autoconvert textfiles from linux to dos and I can't
> see correctly printed e-mail.
> How can I do?
> Thank's.

Two options:  

1) Make sure your printer is set to interpret a bare line feed as CRLF

2) Double check your printer driver

No, three options! =^_^=

3) Use the following shell script, saved into two separate files as
indicated, on your data:

unix2dos:
#!/bin/sh

ThisDir="/home/ke6isf/bin"

case $# in
0 )
	sed -f ${ThisDir}/unix2dos.sed
	;;
* )
	TMP="/tmp/`basename ${0}`.$$"
	for f in $*
	do
		if	[ -f ${f} ]
		then
			sed -f ${ThisDir}/unix2dos.sed < ${f} > ${TMP}
			mv ${f} ${f}.unix
			cp ${TMP} ${f}
		fi
	done
	rm -f ${TMP}
	;;
esac
(EOF)

unix2dos.sed:
s/$//
(EOF)

(if your display shows the second argument as an odd character, please
note that it should be 's/$/(CR)/'.)

Adjust the shell script as necessary.

-Dennis

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic