From owner-freebsd-questions Tue Nov 20 9:20:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from sushi.linuxforlesbians.org (cc265612-b.albqrq1.nm.home.com [67.165.160.99]) by hub.freebsd.org (Postfix) with ESMTP id 1966037B417 for ; Tue, 20 Nov 2001 09:20:43 -0800 (PST) Received: by sushi.linuxforlesbians.org (Postfix, from userid 1001) id 432F81939; Tue, 20 Nov 2001 10:22:21 -0700 (MST) Date: Tue, 20 Nov 2001 10:22:21 -0700 From: Peter Sanchez To: freebsd-questions@freebsd.org Subject: Re: Dos2Unix Message-ID: <20011120102221.B56969@sushi.linuxforlesbians.org> References: <20011120145239.D775@aviion.alfred.cx> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011120145239.D775@aviion.alfred.cx>; from andrew.reid@plug.cx on Tue, Nov 20, 2001 at 02:52:39PM +1030 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ya, unix2dos is nifty, I just wrote a small shell script to do it for me. Here it is #!/bin/sh # # syntax: strip.sh filename # if [ "$#" -ne 1 ]; then echo "Usage: $0 input_file_name" exit 1 fi if [ -f $1 ]; then tr -d '\r' < $1 > $1.$$ mv $1.$$ $1 echo "Done! You can now open $1" exit 0 else echo "Error: $1 does not exist." exit 1 fi Just if anyone finds it useful :) Peter On Tue, Nov 20, 2001 at 02:52:39PM +1030, Andrew Reid wrote: > On Mon, Nov 19, 2001 at 07:59:54PM -0800, Ben Witkowski wrote: >=20 > > most unix systems have a dos2unix utility that removes the trailing ^M > > characters from each line. is there a comprable tool for FreeBSD, or d= oes > > anyone know where to find the binaries (or a script) to do the job? >=20 > # cd /usr/ports/converters/unix2dos > # make > # make install >=20 > - andrew >=20 > --=20 > Andrew J. Reid "Catapultam habeo. Nisi pecuniam omnem = =20 > andrew.reid@plug.cx mihi dabis, ad caput tuum saxum immane= =20 > +61 401 946 813 mittam" = =20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message --=20 Peter Sanchez, aka fut0n | "The ability to read is what - fut0n@linuxforlesbians.org | distinguishes Unix users from - www.linuxforlesbians.org | those of more popular platforms." - FreeBSD or DIE | - John Lasser --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjv6kUwACgkQQ2cuXVjoDlv4MwCfcGCv6NgIXjvz3cBfstzb3/it fjcAnjgh0C6GGMgXuhuZT3PqxNcuurV4 =baP6 -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message