Sponsored Content
Full Discussion: Fairly new to scripting
Top Forums UNIX for Dummies Questions & Answers Fairly new to scripting Post 302136810 by ocanyc on Wednesday 19th of September 2007 08:55:23 PM
Old 09-19-2007
Quote:
Originally Posted by rakeshou
Should look something like this

Code:
ftp -n ${HOST} << SCRIPT
user <username> <password>
binary
lcd ${WHERE_TO_SAVE}
cd ${WHERE_DOWNLOAD_FROM}
get ${WHICH_FILE_TO_GET}
quit
SCRIPT

if [ -f ${WHICH_FILE_TO_GET} ]
then
    echo "successful"
else
    echo "Failed: could not FTP"
    echo "Failed" | mailx -s "FTP failed for ${WHICH_FILE_TO_GET}" abc@xyz.com

fi

Thank you for the idea. From what I can tell basically this script would just check if the file in the location but not necessarily know if the file is complete, correct?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies

2. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

3. Programming

Does realloc free fairly?

Hello, my program works properly but valgrind tells me I am not freeing allocated memory. I think the problem is in realloc. I am pretty sure I do something wrong with realloc, because I changed it a bit and valgrind noticed less errors (that the program wasn't working properly with less errors... (3 Replies)
Discussion started by: samciz
3 Replies

4. Programming

Read/Write a fairly large amount of data to a file as fast as possible

Hi, I'm trying to figure out the best solution to the following problem, and I'm not yet that much experienced like you. :-) Basically I have to read a fairly large file, composed of "messages" , in order to display all of them through an user interface (made with QT). The messages that... (3 Replies)
Discussion started by: emitrax
3 Replies

5. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

6. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

7. Android

Android Scripting Environment: Shell Scripting and Android

I just upgraded to Android 2.2 from 2.1. The GPS issue that was troublesome in 2.1 seems to have been fixed. Some of web browsing seems faster, but it could just be my connection is better today ;) Flash works in some browsers but not very good and it is too slow for Flash apps designed for... (0 Replies)
Discussion started by: Neo
0 Replies

8. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

9. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

10. Shell Programming and Scripting

Help on a fairly complicated shell script

Hello, also with the help of some great users of this forum, I have created following shell script. MM=120 GG=5000 # get size of directory szm=$(du -s --block-size M ./192.168.1.xxx | awk '{print int($0)}') data=$(date --rfc-3339=seconds) if ; then # too big delete older files ... (10 Replies)
Discussion started by: dcaccount
10 Replies
UGET-GTK(1)							   User Commands						       UGET-GTK(1)

NAME
uget-gtk - a download manager that uses gtk+2, and libcurl SYNOPSIS
uget-gtk [options] [URL] DESCRIPTION
Help Options: -?, --help Show help options. --help-all Show all help options. --help-gtk Show GTK+ Options Application Options: --quiet add download directly. Don't show dialog. --category-index=N add download to Nth category. (default -1) --folder=FOLDER placed download file in FOLDER. --filename=FILE set download filename to FILE. --user=USER set both ftp and http user to USER. --password=PASS set both ftp and http password to PASS. --proxy-type=N set proxy type to N. (0=Don't use) --proxy-host=HOST set proxy host to HOST. --proxy-port=PORT set proxy port to PORT. --proxy-user=USER set USER as proxy username. --proxy-password=PASS set PASS as proxy password. --http-user=USER set http user to USER. --http-password=PASS set http password to PASS. --http-referer=URL include `Referer: URL' header in HTTP request. --http-cookie-data=STRING load cookies from STRING. --http-cookie-file=FILE load cookies from FILE. --http-post-data=STRING use the POST method; send STRING as the data. --http-post-file=FILE use the POST method; send contents of FILE --ftp-user=USER set ftp user to USER. --ftp-password=PASS set ftp password to PASS. --display=DISPLAY X display to use AUTHOR
uget was written by Raymond Huang <plushuang at users.sourceforge.net>,and this manual page was originally written by Dennis Craven <dcraven@gmail.com> uget-gtk 1.4.9 July 2009 UGET-GTK(1)
All times are GMT -4. The time now is 05:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy