I thought of that, but what if the url is:

http://server.com/longer/annoying/path/to/sourcefile.2.3.4.tar.bz

In other words, if the length of the path is unpredictable :(


On Wed, 14 Dec 2005 16:56:29 +1300
David Mann wrote:

> Use cut with a specified delimiter, eg:
> 
> echo "http://server.com/path/to/sourcefile-2.3.4.tar.bz"; | cut -d / -f 6
> 
> - Dave
> 
> On Dec 14, 2005, at 4:49 PM, Nick Rout wrote:
> 
> > Excellent, thanks
> >
> > Now, how do i turn a url like:
> >
> > http://server.com/path/to/sourcefile-2.3.4.tar.bz
> >
> > into just the filename like this:
> >
> > sourcefile-2.3.4.tar.bz

-- 
Nick Rout <[EMAIL PROTECTED]>

Reply via email to