Date: Tue, 20 Nov 2001 10:22:21 -0700 From: Peter Sanchez <fut0n@linuxforlesbians.org> To: freebsd-questions@freebsd.org Subject: Re: Dos2Unix Message-ID: <20011120102221.B56969@sushi.linuxforlesbians.org> In-Reply-To: <20011120145239.D775@aviion.alfred.cx>; from andrew.reid@plug.cx on Tue, Nov 20, 2001 at 02:52:39PM %2B1030 References: <DBEEJCFFMKHFOCLJLKFBCELFCAAA.ben@alohagrowers.com> <20011120145239.D775@aviion.alfred.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
--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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011120102221.B56969>
