Sponsored Content
Top Forums Shell Programming and Scripting using FTP related commands in nawk utility in shell programming Post 25788 by peter.herlihy on Monday 5th of August 2002 06:28:29 PM
Old 08-05-2002
Of course it would be useful to send the code!

Here's one way...not the only way as there are other remoter tools...but this was one I was forced to use to perform FTP functions within a script....

FTPid='your user'
FTPpwd='your password'
FTPserver='your destination server'
FINDstatement='find /export/home/ -mtime +29 -exec rm {} \\;'

(
sleep 2
echo ${FTPid}
sleep 2
echo ${FTPpwd}
sleep 2
echo ${FINDstatement}
sleep 5
exit
) | telnet ${FTPserver}

Obviously the FIND statement can be anything.......I am putting in the sleeps so that it has enought time to complete before doing to next step.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How are the following two commands related?

Trying to get through UNIX class that I mostly missed due to illness. If anyone can help me with this question I'd appreciate it. Thank you. How are the following two commands related? 1s -1R /proc ps ax (1 Reply)
Discussion started by: radhanuja
1 Replies

2. UNIX for Dummies Questions & Answers

Memory related Unix commands

I am using rsync for my backing up my files, from one box to other box, While doing I am getting following error. arb821/Server/logs/rpcMetrics/ arb821/Server/logs/AribaOrderTransmitterLog.txt write failed on arb821/Server/logs/AribaOrderTransmitterLog.txt : Error 0 rsync error: error in... (2 Replies)
Discussion started by: redlotus72
2 Replies

3. Solaris

Questions related to ndd commands

Hello Gurus I would like to know more about ndd commands related to ethernet(NIC) like how to set link_status, link_speed & link_mode as I know how to check these value. And I also would like to know how to make these setting permanents after reboot as I know that these setting will vanish... (5 Replies)
Discussion started by: amity
5 Replies

4. Shell Programming and Scripting

How to use ftp commands inside shell script? Help please

Dears, I'm new in shell scripting and i need your help, i would like to know how can i create a script to ftp to a certain unix/linux machine/server IP address and get a file for example without user intervention? How can i force the script to use a certain username and password to access this... (4 Replies)
Discussion started by: Dendany83
4 Replies

5. Solaris

Queries related to runlevels and fdisk utility...

Hello friends.. I have 2 doubts as follows: 1.What is the difference between init s (single user mode), init S (single user mode), init 1 (single user mode), and again failsafe mode. As far as I have seen, init s and init 1 does the same thing: putting the system in maintenance mode asking for... (2 Replies)
Discussion started by: saagar
2 Replies

6. UNIX for Advanced & Expert Users

Unix commands Related to

Hi all, Does unix has any commands for creating BLOB and CLOB objects. Please forward me any sites or samples (2 Replies)
Discussion started by: rajeshorpu
2 Replies

7. Shell Programming and Scripting

Korn Shell programming (FTP, LOOPS, GREP)

Hello All, I have another Korn shell question. I am writing a script that will ftp a file from my production database to my test database. To this, I have to construct a loop that checks a specified folder for a file. If the file exists, I want it execute the ftp protocol and then exit. ... (2 Replies)
Discussion started by: jonesdk5
2 Replies

8. UNIX for Dummies Questions & Answers

unix commands related to ftp of files..

Hi, I am new to unix , I was planning to write a script that will FTP files to destination folder. , Please guide me what are the various networking commands that unix will help in this ftp process..?:confused: (1 Reply)
Discussion started by: rahul125
1 Replies

9. Shell Programming and Scripting

Commands not executing after FTP in shell script

Hello In the shell script we have a FTP command like below ftp -n -v -q winftp.principal.com >/infa/datafiles/GRP/Scripts/ftp_from_infa_dvcn.log<<END_SCRIPT   quote USER $FTP_USER quote PASS $FTP_PASS ascii lcd $FTP_LOCALDIR cd $FTP_FLDR put $FTP_FILE   bye exit If i... (1 Reply)
Discussion started by: Pratik4891
1 Replies

10. Open Source

Shell script file movement to a Mail Box server using ftp commands

Hi All, I have a current Process that runs "windows script " for the file movement that needs to changed to a "DataStage Process (Using shell script )" Source :Text file is getting generated as part of Datastage Jobs processes and resides in a shared drive (Unix server) Target :ftp... (2 Replies)
Discussion started by: developer.dwh9
2 Replies
ucblinks(1B)					     SunOS/BSD Compatibility Package Commands					      ucblinks(1B)

NAME
ucblinks - adds /dev entries to give SunOS 4.x compatible names to SunOS 5.x devices SYNOPSIS
/usr/ucb/ucblinks [-e rulebase] [-r rootdir] DESCRIPTION
ucblinks creates symbolic links under the /dev directory for devices whose SunOS 5.x names differ from their SunOS 4.x names. Where possi- ble, these symbolic links point to the device's SunOS 5.x name rather than to the actual /devices entry. ucblinks does not remove unneeded compatibility links; these must be removed by hand. ucblinks should be called each time the system is reconfiguration-booted, after any new SunOS 5.x links that are needed have been created, since the reconfiguration may have resulted in more compatibility names being needed. In releases prior to SunOS 5.4, ucblinks used a nawk rule-base to construct the SunOS 4.x compatible names. ucblinks no longer uses nawk for the default operation, although nawk rule-bases can still be specifed with the -e option. The nawk rule-base equivalent to the SunOS 5.4 default operation can be found in /usr/ucblib/ucblinks.awk. OPTIONS
-e rulebase Specify rulebase as the file containing nawk(1) pattern-action statements. -r rootdir Specify rootdir as the directory under which dev and devices will be found, rather than the standard root directory /. FILES
/usr/ucblib/ucblinks.awk sample rule-base for compatibility links ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscpu | +-----------------------------+-----------------------------+ SEE ALSO
devlinks(1M), disks(1M), ports(1M), tapes(1M), attributes(5) SunOS 5.10 13 Apr 1994 ucblinks(1B)
All times are GMT -4. The time now is 01:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy