Oct 6, 2003 #1 fathead IS-IT--Management Joined Apr 13, 2002 Messages 154 I want to create a script that will ftp to a remote server, login, then upload a file...how can i do this????
I want to create a script that will ftp to a remote server, login, then upload a file...how can i do this????
Oct 7, 2003 #2 Dronealone IS-IT--Management Joined Mar 13, 2002 Messages 64 Location GB Hi I'm doing the same thing, using a bash script on a Red Hat Linux box. Can anybody tell me how I can generate a filename which incorporates a timestamp (i.e. so its unique each time its generated) from a bash script? Heres my FTP stuff: #!/bin/sh ftp -inv <<! open 12.12.12.12 user username password bin put filename.ext quit Upvote 0 Downvote
Hi I'm doing the same thing, using a bash script on a Red Hat Linux box. Can anybody tell me how I can generate a filename which incorporates a timestamp (i.e. so its unique each time its generated) from a bash script? Heres my FTP stuff: #!/bin/sh ftp -inv <<! open 12.12.12.12 user username password bin put filename.ext quit
Oct 7, 2003 #3 dbase77 Technical User Joined Apr 23, 2002 Messages 591 Location IE Hi, Create 1 variable to get your timestamp. eg #!/bin/sh time=`date | awk '{print $4}'` ftp -inv <<! open 12.12.12.12 user username password bin put filename.ext filename_$time.txt quit Timestamp the file was created or timestamp the file is transfer? feroz Upvote 0 Downvote
Hi, Create 1 variable to get your timestamp. eg #!/bin/sh time=`date | awk '{print $4}'` ftp -inv <<! open 12.12.12.12 user username password bin put filename.ext filename_$time.txt quit Timestamp the file was created or timestamp the file is transfer? feroz