wget same filename from subdirectories and rename or concat


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting wget same filename from subdirectories and rename or concat
# 1  
Old 06-27-2011
wget same filename from subdirectories and rename or concat

I would like to wget a file "index.html" from a site which is lies in different subdirectories and is different in size. The index.html shall be concatenated or renamed to index01.html index02.html .... I would like to store this file in just one directory and use the option -nd. Though i can't get the code solved to rename or concatenate.

This my code i got so far:
Code:
wget --mirror --no-directories --accept=index.html

Can anybody help?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wget rename file

Is it possible to use a cookie transfer to a location and then rename the output? cd target_directory wget -x --load-cookies cookies.txt http://172.24.188.113/data/getCSV.csv | for file in * do mv $file $file.txt done For example, if I change the directory to C:\test and use the ... (2 Replies)
Discussion started by: cmccabe
2 Replies

2. UNIX for Dummies Questions & Answers

Rename a large number of files in subdirectories

Hi, I have a large number of subdirectories (>200), and in each of these directories there is a file with a name like "opp1234.dat". I'd like to know how I could change the names of these files to say "out.dat" in all these subdirectories in one go. Thanks! (5 Replies)
Discussion started by: lost.identity
5 Replies

3. Shell Programming and Scripting

Filename (concat) head -1 > newfilelist

Gurus. Would appreciate your help very much. I would like to list all the files in directory, and concat the header record in each file with the filename, and output that list to a filelist. ie. filename|header{filename} Thanks in advance (6 Replies)
Discussion started by: sats2059
6 Replies

4. Shell Programming and Scripting

Rename FileName in the Directory

In the Directory all the Files are following format. Filename_yyyymmdd_numbers.txt eg. file_name_20120106_015802.txt . I want to write the Shell script to rename all the file to file_name.txt.in the directory. Thanks Mani (5 Replies)
Discussion started by: gavemani
5 Replies

5. UNIX for Dummies Questions & Answers

cat files from subdirectories output using same filename

Hi, I need to concatenate data files with a .mp extension that are stored in directories by year. I want to keep the same filename as an output for example: for the file name p030.mp, which resides in the following subdirectories: /2000/p030.mp /2001/p030.mp /2002/p030.mp I want to:... (4 Replies)
Discussion started by: cmshreve
4 Replies

6. UNIX for Dummies Questions & Answers

rename filename

Hi, I am pretty new to this. I have a condition where in I want to replace all files within a folder. All filenames with character "abc" would need to replaced with "xyz". eg: helloabcworld-->helloxyzworld helloworld-->helloworld ... ... Thanks in advance. (6 Replies)
Discussion started by: sakets_2000
6 Replies

7. Shell Programming and Scripting

How do I rename a filename in a directory?

Hi, I've got a large to task to do, which I've broken into three section. I'm just stuck on one of the sections. I have to change the end of a filename from .txt to .doc in a directory. So if I have a directory called "folder1" and two files contained in it called "file1.txt" and "file2.txt",... (7 Replies)
Discussion started by: TeddyP
7 Replies

8. Shell Programming and Scripting

wget and rename

I want to download xyz.php to abc.php and save it in the directory mentioned. wget -directory-prefix=/usr/local/apache/htdocs/ http://somesite.com/xyz.phpThis command will save the file as xyz.php but the following does not work... wget -directory-prefix=/usr/local/apache/htdocs/abc.php... (1 Reply)
Discussion started by: shantanuo
1 Replies

9. Shell Programming and Scripting

Grep and rename the filename

Hi All, Can you please help me. The situation is like this. There are many different file name in this directory. I have to grep all the file that the name start with "PTWO" and rename it to COM with the current date. This is the script that I have done and it hit an... (16 Replies)
Discussion started by: badbunny9316
16 Replies

10. Shell Programming and Scripting

rename multiple filename.45267.txt to >> filename.txt

i have several thousand files and in subdirs that are named file.46634.txt budget.75346.pdf etc i want to remove the number but retain the extension. it is always a 5 digit. thanks. (6 Replies)
Discussion started by: jason7
6 Replies
Login or Register to Ask a Question
URIFIND(1p)						User Contributed Perl Documentation					       URIFIND(1p)

NAME
urifind - find URIs in a document and dump them to STDOUT. SYNOPSIS
$ urifind file DESCRIPTION
urifind is a simple script that finds URIs in one or more files (using "URI::Find"), and outputs them to to STDOUT. That's it. To find all the URIs in file1, use: $ urifind file1 To find the URIs in multiple files, simply list them as arguments: $ urifind file1 file2 file3 urifind will read from "STDIN" if no files are given or if a filename of "-" is specified: $ wget http://www.boston.com/ -O - | urifind When multiple files are listed, urifind prefixes each found URI with the file from which it came: $ urifind file1 file2 file1: http://www.boston.com/index.html file2: http://use.perl.org/ This can be turned on for single files with the "-p" ("prefix") switch: $urifind -p file3 file1: http://fsck.com/rt/ It can also be turned off for multiple files with the "-n" ("no prefix") switch: $ urifind -n file1 file2 http://www.boston.com/index.html http://use.perl.org/ By default, URIs will be displayed in the order found; to sort them ascii-betically, use the "-s" ("sort") option. To reverse sort them, use the "-r" ("reverse") flag ("-r" implies "-s"). $ urifind -s file1 file2 http://use.perl.org/ http://www.boston.com/index.html mailto:webmaster@boston.com $ urifind -r file1 file2 mailto:webmaster@boston.com http://www.boston.com/index.html http://use.perl.org/ Finally, urifind supports limiting the returned URIs by scheme or by arbitrary pattern, using the "-S" option (for schemes) and the "-P" option. Both "-S" and "-P" can be specified multiple times: $ urifind -S mailto file1 mailto:webmaster@boston.com $ urifind -S mailto -S http file1 mailto:webmaster@boston.com http://www.boston.com/index.html "-P" takes an arbitrary Perl regex. It might need to be protected from the shell: $ urifind -P 's?html?' file1 http://www.boston.com/index.html $ urifind -P '.org' -S http file4 http://www.gnu.org/software/wget/wget.html Add a "-d" to have urifind dump the refexen generated from "-S" and "-P" to "STDERR". "-D" does the same but exits immediately: $ urifind -P '.org' -S http -D $scheme = '^(http):' @pats = ('^(http):', '.org') To remove duplicates from the results, use the "-u" ("unique") switch. OPTION SUMMARY
-s Sort results. -r Reverse sort results (implies -s). -u Return unique results only. -n Don't include filename in output. -p Include filename in output (0 by default, but 1 if multiple files are included on the command line). -P $re Print only lines matching regex '$re' (may be specified multiple times). -S $scheme Only this scheme (may be specified multiple times). -h Help summary. -v Display version and exit. -d Dump compiled regexes for "-S" and "-P" to "STDERR". -D Same as "-d", but exit after dumping. AUTHOR
darren chamberlain <darren@cpan.org> COPYRIGHT
(C) 2003 darren chamberlain This library is free software; you may distribute it and/or modify it under the same terms as Perl itself. SEE ALSO
URI::Find perl v5.14.2 2012-04-08 URIFIND(1p)