Sponsored Content
Top Forums Shell Programming and Scripting Shell Script - If and smbclient (ftp)...help Post 302767017 by Scrutinizer on Wednesday 6th of February 2013 05:31:10 AM
Old 02-06-2013
If you only use TAB's for indent, you could use <<- FTP instead of << FTP
These 2 Users Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using ftp in a shell script.

I am trying to ftp some files from a certain directory, but i got an invalid command. does anybody know why i got this error? ftp -v -i -n <<SCRIPT open servername user username password cd /server/logs for file in MCWAS* do put ${file} /home/test/${file} done bye SCRIPT (2 Replies)
Discussion started by: caesarkim
2 Replies

2. Shell Programming and Scripting

ftp in shell script

Hi, I have to ftp to a remote machine. i have got the Ip, username and password and the file path.. I need to get the file name with out user intervention in my script.. is there any way to do this.. please help esham (2 Replies)
Discussion started by: esham
2 Replies

3. UNIX for Dummies Questions & Answers

Shell script for ftp

Hi ,, I am wrting a shell script to ftp a file from remote server but its giving some problem to me.can you help me in debugging this. #!/usr/bin/ksh HOST="some ip" user="user_name" passwd="password" ftp -n $HOST >>END_SCRIPT USER $user $passwd binary prompt get... (3 Replies)
Discussion started by: namishtiwari
3 Replies

4. Shell Programming and Scripting

FTP via shell script

Hi, I need to upload a file via ftp. I have given : ftp -n $HOST <<END quote user $USER quote pass $PASSWD prompt off put bus.txt quit END Its throwing a syntax error at "<<" symbol. What should be done for this ?? (2 Replies)
Discussion started by: risshanth
2 Replies

5. Shell Programming and Scripting

FTP using shell script

Hi All, I want to make a ftp call using a separate file where the ftp commands will reside. Please find below the details: I have 2 files Sample1.sh and Properties Properties --------- <username> <password> .... other ftp commands Sample1.sh ---------- ftp -v <servername> <... (1 Reply)
Discussion started by: pickpeters
1 Replies

6. Shell Programming and Scripting

Use ftp is a shell script

Hi, What i would like to do is to use a shell script connect to a remote computer and download files from a specific directory. I wrote the following script. #!/bin/sh HOST='IP' USER='yourid' PASSWD='yourpw' FILE='*.txt' REMOTEPATH=/incoming/MSC/ ftp $HOST <<END_SCRIPT user $USER... (3 Replies)
Discussion started by: chriss_58
3 Replies

7. UNIX for Dummies Questions & Answers

FTP shell script

Hi I am new in UNIX field. I don't know if I am posting in right forum or not. And I have also found out that there are so many posts about ftp shell scripting. I have tried those but actually having some problem. Well, my script should do the following..... It finds files( the filename ended... (3 Replies)
Discussion started by: abhishek_510
3 Replies

8. Shell Programming and Scripting

Help with Shell script for FTP

#!/usr/bin/ksh export filename=/grid/PowerCenter/inbound/AT/filelist.txt export SOURCE_DIR=/grid/PowerCenter/inbound/AT export ICOMS_FTP_TGT_DIR1=/dw/input/ATU/ICOM_SERV1 export ICOMS_FTP_TGT_DIR2=/dw/input/AT/ICOM_SERV2 export FILE_MASK="ATRPU_RP_ATU" echo "start" ftp_data_file() { ... (15 Replies)
Discussion started by: vsmeruga
15 Replies

9. UNIX for Dummies Questions & Answers

FTP in Shell Script

Dear All, I am using FTP in a script. But when i exit from the FTP session, the commands written after EOF don't get executed. i.e. ftp <<EOF quote $login quote $password cd /tmp mget *somefile* bye EOF echo $some_variable #This last echo command or whatever piece of commands i... (10 Replies)
Discussion started by: Salman786
10 Replies

10. Shell Programming and Scripting

Need a Shell Script for FTP

Hello Brothers, I am new in shell script.I need a shell script that will run in Linux Server. Script will connect to windows FTP server before connection script will check the connection from linux server to windows server, if connection is ok then show a message and get specific file and... (34 Replies)
Discussion started by: maruf
34 Replies
SMBTAR(1)							   User Commands							 SMBTAR(1)

NAME
smbtar - shell script for backing up SMB/CIFS shares directly to UNIX tape drives SYNOPSIS
smbtar [-r] [-i] [-a] [-v] {-s server} [-p password] [-x services] [-X] [-N filename] [-b blocksize] [-d directory] [-l loglevel] [-u user] [-t tape] {filenames} DESCRIPTION
This tool is part of the samba(7) suite. smbtar is a very small shell script on top of smbclient(1) which dumps SMB shares directly to tape. OPTIONS
-s server The SMB/CIFS server that the share resides upon. -x service The share name on the server to connect to. The default is "backup". -X Exclude mode. Exclude filenames... from tar create or restore. -d directory Change to initial directory before restoring / backing up files. -v Verbose mode. -p password The password to use to access a share. Default: none -u user The user id to connect as. Default: UNIX login name. -a Reset DOS archive bit mode to indicate file has been archived. -t tape Tape device. May be regular file or tape device. Default: $TAPE environmental variable; if not set, a file called tar.out . -b blocksize Blocking factor. Defaults to 20. See tar(1) for a fuller explanation. -N filename Backup only files newer than filename. Could be used (for example) on a log file to implement incremental backups. -i Incremental mode; tar files are only backed up if they have the archive bit set. The archive bit is reset after each file is read. -r Restore. Files are restored to the share from the tar file. -l log level Log (debug) level. Corresponds to the -d flag of smbclient(1). ENVIRONMENT VARIABLES
The $TAPE variable specifies the default tape device to write to. May be overridden with the -t option. BUGS
The smbtar script has different options from ordinary tar and from smbclient's tar command. CAVEATS
Sites that are more careful about security may not like the way the script handles PC passwords. Backup and restore work on entire shares; should work on file lists. smbtar works best with GNU tar and may not work well with other versions. DIAGNOSTICS
See the DIAGNOSTICS section for the smbclient(1) command. VERSION
This man page is correct for version 3 of the Samba suite. SEE ALSO
smbd(8), smbclient(1), smb.conf(5). AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. Ricky Poulten wrote the tar extension and this man page. The smbtar script was heavily rewritten and improved by Martin Kraemer. Many thanks to everyone who suggested extensions, improvements, bug fixes, etc. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and updated for the Samba 2.0 release by Jeremy Allison. The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy. Samba 3.5 06/18/2010 SMBTAR(1)
All times are GMT -4. The time now is 10:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy