FTP script with nested function
An example of an FTP script with Korn shell.
For “$CONFTMP” input file of format: hostname username password
cat "$CONFTMP" | fgrep -v "#" | while read LINE do FTPHOST=$(echo "$LINE" | awk '{print $1}') FTPUSER=$(echo "$LINE" | awk '{print $2}') FTPPASS=$(echo "$LINE" | awk '{print $3}') FTPPUT() { { echo "open $FTPHOST" echo "user $FTPUSER $FTPPASS" echo "lcd $LOCALDIR" echo "cd $REMOTEDIR" echo "put $FILENAME" echo "quit" } | ftp -nvi -T 3 } echo "Uploading to $FTPHOST" FTPPUT echo "--------------------------" done
I have a long script and I need to upload it online to make it a website. I have NO money, therefore need a FREE web hosting provider??? Could someone give me step by step guide on how to do this???
Thanks in Advance!!!!!!!