If there is a more appropriate place to ask about bash, please let me know.

I'm starting to learn how to use bash.  For a start, I want to write a
script that copies some .html files from /floppy to a ~/public_html
directory, change to permissions, user, and groups appropriately and delete
the files in /floppy after this is done.

Part of my attempt:
cd /floppy

if [-e /floppy/*.html]; then
  for filename in $*
    fromdos < $filename > $HOME/public_html/$filename
    chown anagle $HOME/public_html/$filename
    chgrp users $HOME/public_html/$filename
    chmod 644 $HOME/public_html/$filename
    rm $filename
  done
else
  echo "No HTML files are located in $PWD./nNothing done."
fi

I get a "token" error on the line with 'fromdos'.  I was thinking of perhaps
using 'ex' or something similar.  Also, I don't know if I'm using the '$*'
correctly.

Thanks for the help.

Adrian
-- 
Adrian Nagle             Ball Aerospace & Technologies Corp.
Thermal Engineer                               P.O. Box 1062
TEL: 303-939-6518                    Boulder, CO  80306-1062
FAX: 303-939-5166               http://www.ballaerospace.com

Reply via email to