Warning: Creating default object from empty value in /home/mirandam/public_html/linux/wp-includes/functions.php on line 292
Fedora, Linux and Stuff :: 2010 :: October

Archive for October, 2010

Automated FTP Script

Monday, October 11th, 2010

I’ve been doing some development for some embedded Linux devices which only support ftp and telnet. In order to automate transfer of binaries from my Fedora development host to the target embedded device I’m using this handy ftp script: pushftp.sh
#!/bin/bash

# arg1 = dest hostname
# arg2 = local file
# arg3 = dest dir

HOST=$1
SRCFILE=$2

USER=root
PASSWD=password
#DESTDIR=/usr/local/data
DESTDIR=$3

ftp -inv $HOST<<ENDFTP
user […]