Oracle Solaris System Administration (MOSC)

MOSC Banner

Unix Script

edited Aug 18, 2010 3:04AM in Oracle Solaris System Administration (MOSC) 6 commentsAnswered
  Hi Experts,

I'm newbie in Shell Srcipt Programming. I want to copy some binary files to remote server through ftp script. I got a script which is working fine like coping files to remote server. But I want to put some conditions in script like if the file already exists so should n't be copy to remote server and copy daily atleast 5 files to remote server. Where to put those conditions in script.

LOCALDIR=/backup/archive

REMOTESERVER=192.0.0.132

REMOTESERVER=/dump/archive

LOGIN=admin

PASSWORD=xyz

FTPLOG='/tmp/ftplog'

date >> $FTPLOG

cd $LOCALDIR

ftp -n $REMOTESERVER <<INPUT_END

quote user $LOGIN

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center