![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CHMOD DOS Filenames | moondogi | UNIX for Dummies Questions & Answers | 1 | 11-02-2008 11:13 PM |
| spaces in filenames, for do | naviztirf | Shell Programming and Scripting | 4 | 10-17-2007 06:08 PM |
| tar contains duplicate filenames | dangral | UNIX for Dummies Questions & Answers | 2 | 03-14-2007 04:18 PM |
| How to concatenate two strings or several strings into one string in B-shell? | fontana | Shell Programming and Scripting | 2 | 08-26-2005 12:58 PM |
| searching for filenames with search strings in another file | pathanjalireddy | Shell Programming and Scripting | 3 | 06-08-2005 06:35 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Need help with getting filenames from url strings
I've been trying to figure out how to extract filenames (with extensions) from a variable that contains a series of URL strings that won't necessarily be the same length or contain the same number of paths as part of a bash shell script. For example
Code:
#!/bin/bash
URLS="http://www.domain.com/folder/filename.tar.gz http://www.anotherdomain.com/folder/subfolder/file.tar.gz"
for url in ${URLS}
do
echo $url
done
exit 0
Last edited by coupestyle; 08-25-2009 at 01:25 PM.. |
| Bookmarks |
| Tags |
| url string filename |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|