From owner-freebsd-questions Tue Oct 22 7:36:51 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAA1537B404 for ; Tue, 22 Oct 2002 07:36:46 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C1E943E4A for ; Tue, 22 Oct 2002 07:36:46 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g9MEaZw17930; Tue, 22 Oct 2002 10:36:35 -0400 (EDT) From: Jerry McAllister Message-Id: <200210221436.g9MEaZw17930@clunix.cl.msu.edu> Subject: Re: FreeBSD bootable floppy Script NOT WORKING To: listsub@401.cx (Roger 'Rocky' Vetterberg) Date: Tue, 22 Oct 2002 10:36:35 -0400 (EDT) Cc: syborg@stny.rr.com (John Bleichert), tcooper1@telusplanet.net (Terry Cooper), questions@FreeBSD.ORG In-Reply-To: <3DB4F006.8020109@401.cx> from "Roger 'Rocky' Vetterberg" at Oct 22, 2002 08:28:22 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > > John Bleichert wrote: > > *snip* > > > * EOM is not a command, it's an end-of-text marker, similar to the one > > used in Perl. > > > > * There are text-file incompatibilities between Unix and DOS. If you're > > copying/pasting the file from the website in Windows, ftp'ing it to a Unix > > box and then trying to run it, all those extra linefeeds may cause > > extremely bizzare errors. > > > > I hate to say it, but if you can only get the Internet on your winbox, you > > should probably fire up vi (or whatever editor you like) and enter it > > manally. Or run a dos2unix utility on the script on your Unix box to set > > it up and clear out those linefeeds. > > A simple command like "perl -i.bak -npe 's/\r\n/\n/g' filename" will > clear the linefeeds and even make a backup of the file. (It has never > failed me, but you'll never know) I sort of doubt that extra CARRIAGE RETURNs (CR not Linefeeds LF) in the file are what is causing his problems, but it may be. But, if you want to get rid of all those extra returns there is an easy way - use 'tr' This works well: tr -d "\r" < INPUTFILE > OUTPUTFILE If you ftp text from a DOS environment to a UNIX environmtent, then just set is to ASCII mode (type 'ascii' after the ftp session is connected) and it will take care of managing the extra characters very nicely with no other intervention needed. ////jerry > > -- > R > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message