Read the rest of the hint for the script...
#! /bin/tcsh
set FTP_ADDRESS=<ftp address>
set FTP_LOGIN=<ftp server login>
set FTP_PASSWORD=<ftp server password>
set FTP_PATH=<path to the folder you want the text file stored>
echo "Changing to home directory..."
cd ~
echo "Setting hostname variable..."
set MAC_NAME=$HOST
echo "Creating text file..."
touch $MAC_NAME.txt
echo "Writing hostname to file..."
echo $MAC_NAME > ~/$MAC_NAME.txt
echo "Writing return carriage to file..."
echo "" >> ~/$MAC_NAME.txt
echo "Writing grepped serial number to file..."
system_profiler | grep -i "serial number" >> ~/$MAC_NAME.txt
echo "FTPing the file..."
curl -T ~/$MAC_NAME.txt -u $FTP_LOGIN:$FTP_PASSWORD ftp://$FTP_ADDRESS/$FTP_PATH
echo "Removing original text file..."
rm ~/$MAC_NAME.txt
echo "Complete!"
This can be prettied up, so any changes are welcome. It basically creates a text file on the machine it's running on, names it after the machine's hostname, puts the machine's hostname in the file, and greps the output of system_profiler for anything with "serial number" in the line and throws it in the text file as well. Then it FTPs that file to a server you specify and deletes the text file on the machine. Now your FTP server will have a directory full of text files with machine serial numbers in them. Quick and dirty, but it did what I needed it to do. I'd comment out the echo lines, as I was using them for debugging.

