Sponsored Content
Full Discussion: FTP - shell script question
Top Forums Shell Programming and Scripting FTP - shell script question Post 302231745 by bsandeep_80 on Wednesday 3rd of September 2008 05:16:55 AM
Old 09-03-2008
Hi dennis,

#!/bin/sh
var=$(ftp www.state.il.us << EOFFile
symphems
binary
ls
quit
EOFfile
)

This gives me the required results but the results of echo $var is as below:
11:52PM 61954 help1.zip 09-02-08 10:01PM 8153 help2.zip 09-02-08 10:01PM 1890 help3.zip

The results are in a single line.

Can you please help how i can have them one fter another.

Thanks,
Sandy
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Not the usual ftp script question

I have an order file that gets updated periodically on a ftp server. The file format is "number one-day of the quarter-file number". For example, the format would look like this for today and would increment as such. 1-26-1 1-26-2 1-26-3 etc After I grab each oder file, I will rename... (9 Replies)
Discussion started by: cstovall
9 Replies

2. 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

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 with shell script

Can I ftp to put file with shell script(as bath file) ? Plz give the simple code to do that. My script look like that #!/bin/sh echo "Start ftp" ftp temphost <<EOF put file quit EOF # end This code ignore username & password but I need to input. How to input username &... (8 Replies)
Discussion started by: aungomarin
8 Replies

5. UNIX for Advanced & Expert Users

FTP in shell script

HI ALL i am writing a shell script in which i have to use FTP command like. FTP <ip address> cd xyz mget* bye but i am not able to perform any command from shell script. once the control goes to FTP, i again have to type all the things. i just want my shell script to take care of the... (8 Replies)
Discussion started by: infyanurag
8 Replies

6. 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

7. 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

8. 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

9. Shell Programming and Scripting

FTP within a SHELL script

I am running the following on linux (on a mac): filename="/Users/thisfilename.txt" hostname="ftp.mysite.com" username="myusername" password="mypassword" echo '=======FTP========' ftp -un $hostname <<EOF quote USER $username quote PASS $password binary put $filename quit EOF I... (4 Replies)
Discussion started by: globalnerds
4 Replies

10. Shell Programming and Scripting

repeating ftp script question

so i got this request to do this: - Script should check for the file ever 15 minutes on the FTP server…if the file is not found, then the whole script exits. File will only be created one a week at random. i have gotten this far, but am kind of stuck, also sleep command doesnt work... (3 Replies)
Discussion started by: zapatur23
3 Replies
bt-obex(1)							    bluez-tools 							bt-obex(1)

NAME
bt-obex - a bluetooth OBEX client/server SYNOPSIS
bt-obex [OPTION...] Help Options: -h, --help Application Options: -a, --adapter=<name|mac> -s, --server [<path>] -p, --opp <name|mac> <file> -f, --ftp=<name|mac> DESCRIPTION
This utility implemented support of Object Push Profile (OPP) and File Transfer Profile (FTP). You can send and receive files to/from remote device using this tool. OPTIONS
-h, --help Show help -a, --adapter <name|mac> Specify adapter to use by his Name or MAC address (if this option does not defined - default adapter used) -s, --server [<path>] Register agent at OBEX server and set incoming/root directory to `path` or current folder will be used; Agent is used to accept/reject incoming bluetooth object push requests -p, --opp <name|mac> <file> Send local file to the specified remote device using object push profile -f, --ftp <name|mac> Start FTP session with remote device; If session opened successfuly, FTP shell will be opened FTP commands: help Show help message exit Close FTP session cd <folder> Change the current folder of the remote device mkdir <folder> Create a new folder in the remote device ls List folder contents get <src> <dst> Copy the src file (from remote device) to the dst file (on local filesystem) put <src> <dst> Copy the src file (from local filesystem) to the dst file (on remote device) cp <src> <dst> Copy a file within the remote device from src file to dst file mv <src> <dst> Move a file within the remote device from src file to dst file rm <target> Deletes the specified file/folder AUTHOR
Alexander Orlenko <zxteam@gmail.com>. SEE ALSO
bt-adapter(1) bt-agent(1) bt-audio(1) bt-device(1) bt-input(1) bt-monitor(1) bt-network(1) bt-serial(1) 2010-08-16 bt-obex(1)
All times are GMT -4. The time now is 08:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy