From owner-freebsd-questions Tue Oct 22 1:28: 7 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 E69D837B404 for ; Tue, 22 Oct 2002 01:28:05 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DA8043E3B for ; Tue, 22 Oct 2002 01:28:02 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g9M8RqKf007721 for ; Tue, 22 Oct 2002 09:27:52 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g9M8RloO007720 for questions@FreeBSD.ORG; Tue, 22 Oct 2002 09:27:47 +0100 (BST) Date: Tue, 22 Oct 2002 09:27:47 +0100 From: Matthew Seaman To: questions@FreeBSD.ORG Subject: Re: FreeBSD bootable floppy Script NOT WORKING Message-ID: <20021022082747.GB7271@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@FreeBSD.ORG References: <3DB4F006.8020109@401.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DB4F006.8020109@401.cx> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-9.9 required=5.0 tests=IN_REP_TO,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_MUTT version=2.41 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 On Tue, Oct 22, 2002 at 08:28:22AM +0200, Roger 'Rocky' Vetterberg wrote: > perl -i.bak -npe 's/\r\n/\n/g' Pedant point of the day. Be careful of combining the -n and -p flags on the perl command line, as they mean contradictory things. '-n' is loop over all the lines of the input *without* printing then, whereas '-p' is loop over all the lines of the input and print them to stdout. The command as written will work, for as perlrun(1) says: A -p overrides a -n switch. but it would be better to write the command as: perl -i.bak -pe 's/\r\n/\n/g' Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message