From owner-freebsd-questions Mon Oct 12 01:28:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA25191 for freebsd-questions-outgoing; Mon, 12 Oct 1998 01:28:19 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA25174 for ; Mon, 12 Oct 1998 01:28:15 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id RAA17707; Mon, 12 Oct 1998 17:57:45 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.1/8.9.0) id RAA22188; Mon, 12 Oct 1998 17:57:21 +0930 (CST) Message-ID: <19981012175721.H21983@freebie.lemis.com> Date: Mon, 12 Oct 1998 17:57:21 +0930 From: Greg Lehey To: Sue Blake , freebsd-questions@FreeBSD.ORG Subject: Re: ftp get filenames with spaces and junk text References: <19981012175615.48311@welearn.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: <19981012175615.48311@welearn.com.au>; from Sue Blake on Mon, Oct 12, 1998 at 05:56:15PM +1000 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 12 October 1998 at 17:56:15 +1000, Sue Blake wrote: > How do I get oddly named files from a macintosh ftp server to land on > my FreeBSD disk with a decent file name? I suppose that depends on your concept of decency. > Here's some examples: > > 981011 Small Bus. Sue > Extra bits for System.sit > > Sorry, that's the only two names I can type that don't use funny > characters. > > I know that the default ftp client can do this (I peeked naughtily at > the man page) but can't figure out how to get it to: > 1. fill spaces between an infinite number of words with underscores Well, you can't expect it to guess that that's what you want. You'll have to tell it. > 2. replace or kill all those squiggly characters > as it writes to my disk. (No I can't change the remote files.) > nmap seems to be the ftp command I need but I can't speak its language. > Can someone help me work it out? Not I. I've never dealt with it. The UNIX way to do this would be first to transfer them (as long as there are no /s in the name, there's no problem), and then rename them with a script. sed is your friend here. I was going to recommend http://www1.daemonnews.org/editing.html, but I see it doesn't address sed. Anyway, it's rather like a filter-based version of ed. > PS... to whoever put all these wonderful bells and whistles into the > ftp client, a big thank you! There's lots of handy stuff in there. Interesting. There was a lot of complaining in -hackers when they went in. I tend to find them useful, too. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message