|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi at all. I have a stupid question on a little script called "FSput.sh" I try to upload multiple files: abcdefg.rar abcdefg.r00 abcdefg.r01 abcdefg.r02 whit: Code:
WPUT $1 ftp://user:password@ftp.server.net/ insert in a bash script When i try to call FSput.sh abcdefg.* thats upload only first file (es: abcdefg.rar) and exit!! ![]() Ok not work.. Then I tried a different script like: Code:
#/bin/bash
FTPU="user" # ftp login name
FTPP="password" # ftp password
FTPS="ftp.server.net" # remote ftp server
FTPF="/" # remote ftp server directory for $FTPU & $FTPP
LOCALD="$"
find /home/transferftp/ -maxdepth 1 -type d | while read line
do
d=$line
f="${d}/$LOCALD"
[ -f $f ] && ncftpput -m -u $FTPU -p $FTPP $FTPS $FTPF ${d}/$LOCALD
doneand try to use try to call FSput.sh abcdefg.* nothing.. same result ulpoad first file (es: abcdefg.rar) and exit ![]() Help me please! Last edited by saltino; 09-04-2010 at 05:58 AM.. Reason: nobody reply ti post |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
Can't comment on "ncftpput" syntax itself or whether you will move the files one-by-one or as a batch. Within the script this line is suspect: Quote:
Code:
LOCALD="$1" And whenever the variable is referenced it should probably be quoted until the point when you want the "*" expanded. Though I can't see whether you want shell or ncftpput to expand the "*". Code:
"${LOCALD}" |
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
if ok Code:
# which lftp /usr/bin/lftp can use this ![]() Code:
# lftp -u ftpuser,ftppasswd ftpserver <<EOF mput abcdefg.r* ls abcdefg.r* quit EOF |
| Sponsored Links | ||
|
|
![]() |
| Tags |
| wput ftpu ftpp ftps ftpf |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stupid ftp question | tyiannak | UNIX for Dummies Questions & Answers | 2 | 02-28-2007 11:28 PM |
| stupid IP question | sugarsweet | IP Networking | 3 | 05-20-2006 06:58 PM |
| sorry if this is a stupid question | sskb | UNIX for Dummies Questions & Answers | 2 | 03-26-2002 03:17 AM |
| Stupid question... | Cortney | UNIX for Dummies Questions & Answers | 6 | 12-06-2001 12:20 PM |
| Stupid Question? | jskillet | UNIX for Dummies Questions & Answers | 9 | 04-26-2001 10:39 AM |
|
|