Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Bash Shell Scripting...HELP ME!!!!


ghost's Avatar
0 0

Ok, I've gotta write a shell script which transfers files from an ftp folder on a local server to an SMB share and then emails a certain person to let them know there are new files. So far I've gotten everything but the emailing part. No matter what I do, I can not get the mail command in Fedora Core 6 to work how I want it. I've been working on this for over a week and it's driving me up the wall.** Can anyone help me please? Posted below is the script I have written so far.

#! /bin/bash

DATETIME=date +%m-%d-%Y-%H%M DATA=ls -1 /home/graphics cd /home/graphics smbclient //192.168.1.8/ftp -A /root/ftp/buauth -c "prompt; mput $DATA; exit" rm $DATA echo "There are new files in \\data-serv\ftp."| mail -s "New Files Detected." user@domain.com exit 0

**Note: I'm a total newb when it comes to programming and scripting.:ninja:


ghost's Avatar
0 0

come on…i know someone out there has to have some knowledge of bash scripting :(


ghost's Avatar
0 0

we're all lazy lol