Sponsored Content
Full Discussion: FTP query
Top Forums UNIX for Advanced & Expert Users FTP query Post 11141 by csong2 on Thursday 29th of November 2001 01:55:32 PM
Old 11-29-2001
Data FTP query

Hi there,

Can anyone tell me how to use FTP so that I can pipe a text file with FTP commands in. I'd like to use this method in my korn shell so that I can log onto a remote server and collate listings of specific files.

Here's what I'm trying to do:

ftp -v host_server < [I]ftp_command_file [I/]

The ftp_command_file file contains the following:

userid
password
ascii
cd /.../
dir ...
bye

I keep getting the password prompt. Any help would be muchly appreciated.

Kind regards
Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KSH n FTP query

Hi, I have this slightly modified FTP code (thanks to this forum) function gather_FTPDate { HOST= USER= PASSWD= exec 4>${TEMP_LOG_FILE} ftp -nv >&4 2>&4 |& echo $? if ] then echo "Unable to connect to FTP server!!!" >> ${LOG_FILE} return 0 fi print -p open... (2 Replies)
Discussion started by: psynaps3
2 Replies

2. Shell Programming and Scripting

FTP inv tee Query

Hi, This is part of a ftp script, Can someone please explain what is its functionality or the basic idea behind it and please throw some light on the inv & tee function marked in red. echo "bye" ) | ftp -inv | tee -a ${DOWNLOAD_LOG} | awk '{ print $0 } /^5.*/ { print "\n\t\t\tFTP session had... (1 Reply)
Discussion started by: openspark
1 Replies

3. UNIX for Advanced & Expert Users

Using FTP to check whether file is completely FTP... plz find the description below

Hi, We have some clients who will place huge files in to one of the remote server. And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients. My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies

4. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

I would like to use the result of a query in another query. How do I redirect/add the output to another variable? $result = odbc_exec($connect, $query); while ($row = odbc_fetch_array($result)) { echo $row,"\n"; } odbc_close($connect); ?> This will output hostnames: host1... (0 Replies)
Discussion started by: hazno
0 Replies

5. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

6. Shell Programming and Scripting

Query related to ftp script

Hi, I was planning to write a FTP script that will FTP files to destination folder. All configuration should be done through a properties files, I have developed two files under /home/499633/scripts) scripts folder, and my main file(ftp_script.sh) should read the properties from the properties... (2 Replies)
Discussion started by: rahul125
2 Replies

7. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

8. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

9. Shell Programming and Scripting

FTP Query

Hi, I have to migrate the scripts from source(HP UX) to destination(Linux) some files. While ftp and downloading the files, the permissions of the files are changing. Is there any option in ftp to get the file in exact permissions. I believe we can achieve it by using tar, however i am... (3 Replies)
Discussion started by: nag_sathi
3 Replies

10. UNIX for Beginners Questions & Answers

Perform SQL query then FTP

Hi All, Would like to ask if its possible to perform sql query in another machine and then the output will be sent back to local via ftp. Machine1 - home server Machine2 - 2nd server Scenario: will perform sql query in Machine2 then put it into temp table then the temp table will be... (2 Replies)
Discussion started by: znesotomayor
2 Replies
ftpgroups(4)						     Kernel Interfaces Manual						      ftpgroups(4)

NAME
ftpgroups - group password file for use with the SITE GROUP and SITE GPASS commands. SYNOPSIS
DESCRIPTION
The file is the group password file for use with the SITE GROUP and SITE GPASS commands. To enable the use of this file, the entry must be made in the configuration file This file contains an alphanumeric string, encrypted password, and the actual group name from the file. Each entry is separated by After a user logs in, the SITE GROUP and SITE GPASS commands may be used to specify an enhanced access group and associated password. If the group name and password are valid, the user becomes (via a member of the group specified in the group access file, The format of the group access file is: where access_group_name is an arbitrary (alphanumeric and/or punctuation) string. encrypted_password is the password encrypted via crypt(3), exactly like in real_group_name is the name of a valid group listed in NOTE: For this option to work for anonymous FTP users, the ftp server must keep permanently open and the group access file is loaded into memory. This means that: (1) the ftp server now has an additional file descriptor open, and (2) the necessary passwords and access privileges granted to users via SITE GROUP will be static for the duration of an FTP ses- sion. If you have an urgent need to change the access groups and/or passwords *NOW*, then kill all of the running FTP servers. FILES
AUTHOR
was developed by the Washington University, St. Louis, Missouri. SEE ALSO
ftpaccess(4). ftpgroups(4)
All times are GMT -4. The time now is 05:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy