08-04-2006
dhruva has a good point - some ftps don't support quit to exit.
However, I don't think you've got the point of 'here documents' - they are a wonderful facility; there is no need to create a separate script containing the commands as the here doc lets you embed these in the main script (with parameter substitution) and pass them to programs that don't explicitly support command files like ftp.
I suggest that you have another look at my earlier code fragment and play with it until it does what you want.
cheers
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I have a simple script that runs each night and transfers a number of files to a remote server. Before files are transferred existing files on the remote box are deleted. All works OK except the deletion part on the remote box returning no such file or directory. As work around Ihave... (2 Replies)
Discussion started by: tzp2ft
2 Replies
2. UNIX for Dummies Questions & Answers
I am really new to unix and want to setup an ftp server on my PC
I am running a Ultra 5 with solaris 9 on it.
I cannot seem to find *any* documentation on how to do this. So I was hoping somebody could point me in the right direction.
:confused: (3 Replies)
Discussion started by: ls=dir
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
I'm attempting to FTP several files using MGET. My problem is that I need to cd to a directory with this naming convention:
YYMMDDHHMM - where the hour and minute is unknown
When I issue cd /ftpdirectory/YYMMDD* from FTP, I receive "No such file or directory
I need a way to get the... (6 Replies)
Discussion started by: kdreaves
6 Replies
4. UNIX for Dummies Questions & Answers
When a user FTP's to their own directory, they can go up the directory and view others files, of course they can not overwrite them but are able to download them if they wish to, is there any way to stop them from view their files and have them be only able to view files that they have permissions... (3 Replies)
Discussion started by: foresthillian
3 Replies
5. UNIX for Advanced & Expert Users
Once a file is ftped to a server is there a way that you can prevent that file from being overwritten if the same process tries to ftp a file with the same name again? (6 Replies)
Discussion started by: lesstjm
6 Replies
6. UNIX for Dummies Questions & Answers
How do you limit an ftp user access to a certain Unix path when putting/getting file to/from your server? And how do you restrict the ftp user from using "cd" or "ls" commands? Given that the ftp user knows the ftp userid, password, and your server ip address.
Thanks in advanced :) (1 Reply)
Discussion started by: XZOR
1 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I'm new to this group and this is my first post to this group.
I need to write a shell script for the requirement given below:
1. I need to connect to a ftp server with my username and password
2. I need to go to some(input) directory.
3. I will have files with same names and... (1 Reply)
Discussion started by: ranjith_taurean
1 Replies
8. Shell Programming and Scripting
Hi,
i have a simple question here--
if we dont use binary while doing a ftp of a file,any sort of problem can arise from this or it is ok.
Thanks (2 Replies)
Discussion started by: namishtiwari
2 Replies
9. Shell Programming and Scripting
HI
In my script its like this
------------
echo "Enter filename"
read fname
ftp -v -n abcd.efh.kk.com << EOF
user userid pwd
bin
mget $fname.tar--not working if i give "$fname", works only as "demo.tar"
bye
------------
My target is to get a $fname.tar from a remote host.How... (4 Replies)
Discussion started by: coolkid
4 Replies
10. UNIX for Dummies Questions & Answers
I have this FTP script:
ADDR=168.218.95.172
ftp -inv $ADDR <<- ftpcmds
user HEHCFTP H$h673sp ... (3 Replies)
Discussion started by: lena keung
3 Replies
LEARN ABOUT DEBIAN
irexec
IREXEC(1) User Commands IREXEC(1)
NAME
irexec - run programs with one button press
SYNOPSIS
irexec [options] [config_file]
DESCRIPTION
This program lets you execute arbitrary commands on an IR signal decoded by lircd, the LIRC daemon. You can give irexec a command line
parameter which has to be a name of a valid config file. If no command line parameters are given irexec reads the default config file which
is usually ~/.lircrc.
If irexec executes a program it will wait until this program terminates. So append a '&' to the command string if you don't want that.
The config string consists of the command to be run.
-h --help
display usage summary
-v --version
display version
-d --daemon
run in background
-n --name
use this program name
OPTIONS
If you add the --daemon option irexec will fork to background. That way you can easily start irexec from an init script. In this case you
should specify a config file on the command line as irexec won't be able to find your home directory. Potential uses are shutting down the
computer, starting a dial-up connection etc.
NOTE
If you start irexec, it reads your ~/.lircrc and reacts only on prog= entries that point to irexec. If you have included more than one pro-
gram in your .lircrc, then start all these programs, they react itself only to their according entries in .lircrc.
SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory.
irexec 0.9.0-pre1 October 2010 IREXEC(1)