Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 1998 17:57:21 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Sue Blake <sue@welearn.com.au>, freebsd-questions@FreeBSD.ORG
Subject:   Re: ftp get filenames with spaces and junk text
Message-ID:  <19981012175721.H21983@freebie.lemis.com>
In-Reply-To: <19981012175615.48311@welearn.com.au>; from Sue Blake on Mon, Oct 12, 1998 at 05:56:15PM %2B1000
References:  <19981012175615.48311@welearn.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981012175721.H21983>