11-28-2015
man wget:
Quote:
DESCRIPTION
GNU Wget is a free utility for non-interactive download of files from the Web.
Retrieve all the target files by either specifying wildcard chars or using the
--input-file option to wget.
Then, loop through the files received loading them into your DB.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm new to scripting. I'm trying to write a script to download files from ftp site, the following is the script and the message i get after running the script. no files were downloaded :(
Thanks advance!
script:
#!/usr/bin/ksh
DAY=`date --date="-1 days" +%y%m%d`
ftp -v -n "ftp.address" <<... (5 Replies)
Discussion started by: tiff-matt
5 Replies
2. Shell Programming and Scripting
Hi guys,
I'm new on this forum and on UNIX. Can somebody help in writing a script to download a file from an FTP server and validating if there is a file to download. If there is a file, I would send it to a mail recipient and if not I would generate an error log.
Thanks in advance!:D (1 Reply)
Discussion started by: rjay_45
1 Replies
3. Shell Programming and Scripting
ftp script doesn't download jpg properly
The downloaded files have color splotches
Here is the script:
ftp -n me@institute.edu <<END_SCRIPT
quote user name
quote pass password
prompt
mget *.jpg
quit
END_SCRIPT
exit 0
cd ../ (2 Replies)
Discussion started by: walforum
2 Replies
4. Shell Programming and Scripting
Hi !
I am just wondering shell script to download data from ftp...
I have text file containing ftp address...looks like this
ftp://site...../filename.xyz
ftp://site...../filename.xyz
ftp://site...../filename.xyz
ftp://site...../filename.xyz
script has to read ftp address and... (8 Replies)
Discussion started by: nex_asp
8 Replies
5. Shell Programming and Scripting
Our main Server "Srv1" is used to generate text files based on specified criteria and it is also connected to two clients (pc1 and pc2) which are responsible for getting the files from Srv1 as it follows:
1. pc1 ( which represents my UNIX machine ) uses shell script to copy the files from Srv1
2.... (3 Replies)
Discussion started by: arm
3 Replies
6. Shell Programming and Scripting
Need assistance
I have a script which i can download the files from ftp server using perl . But i want to download multiple files at a time
#!/usr/bin/perl -w
use Net::FTP;
$ftp = Net::FTP->new("ftp.ncdc.noaa.gov");
$ftp->login('username', 'password');
$ftp->cwd("<dir>");... (9 Replies)
Discussion started by: ajayram_arya
9 Replies
7. Shell Programming and Scripting
Hello this is my first post in this forum , I dont want to be unhappy..
I am writing one script but facing difficulty to find the latest file with some new pattern
My requirement is
1. The file is coming like "ABCD-23220140303" at FTP server once in a week.
2. script will run on daily... (3 Replies)
Discussion started by: ajju
3 Replies
8. Shell Programming and Scripting
Hi,
I have a video script. it has embedded Youtube videos. I want replace them downloaded version mp4 videos.
this script has a mysql table. I want search "url_flv" field on table a youtube link if has a youtube link I want download it this command.
I want extract uniq_id field for file... (2 Replies)
Discussion started by: tara123
2 Replies
9. Shell Programming and Scripting
I am attempting to download a url in csv format. When I download this url in a browser excel opens up and automatically populates with comma separated values.
When I try to use curl or wget I get nothing or garbage.
This on the command line just hangs
wget -b... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
10. Shell Programming and Scripting
Hello,
My question is about curl command. (ubuntu14.04)
In terminal, I am able to download my mainfile with:
curl -u user1:pass1 http://11.22.33.44/*******
When I convert it into bash script like this:
#!/bin/bash
cd /root/scripts
computer_ip=11.22.33.44
curl -u $1:$2... (8 Replies)
Discussion started by: baris35
8 Replies
LEARN ABOUT CENTOS
shell-quote
SHELL-QUOTE(1) User Contributed Perl Documentation SHELL-QUOTE(1)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.16.3 2010-06-11 SHELL-QUOTE(1)