Shell script debug

Paul_Melson@keykertusa.com Paul_Melson@keykertusa.com
Thu, 5 Jul 2001 13:07:42 -0400


>I may just be stupid, but I wrote this little script, which I have 
probably
>done wrong, but if anyone out there can help point me in the right
>directions, I'd really appreciate it.
>
>--------
>
>#!/bin/sh
>PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
>
>echo "Creating CGI Directories.../n"
>
>mkdir /Library/WebServer/CGI-Executables/ikonboard
>mkdir /Library/WebServer/CGI-Executables/ikonboard/data
>mkdir /Library/WebServer/CGI-Executables/ikonboard/help
>mkdir /Library/WebServer/CGI-Executables/ikonboard/members
>mkdir /Library/WebServer/CGI-Executables/ikonboard/messages
>
>echo "Creating WWW Directories.../n"
>
>mkdir /Library/WebServer/Documents/ikonboard
>mkdir /Library/WebServer/Documents/ikonboard/avatars
>mkdir /Library/WebServer/Documents/ikonboard/emoticons
>mkdir /Library/WebServer/Documents/ikonboard/images
>
>echo "Checking CGI Directory Permissions.../n"
>
>chmod 777 /Library/WebServer/CGI-Executables/ikonboard/
>chmod 777 /Library/WebServer/CGI-Executables/ikonboard/data
>chmod 777 /Library/WebServer/CGI-Executables/ikonboard/help
>chmod 777 /Library/WebServer/CGI-Executables/ikonboard/members
>chmod 777 /Library/WebServer/CGI-Executables/ikonboard/messages
>
>echo "Checking WWW Directory Permissions.../n"
>chmod 755 /Library/WebServer/Documents/ikonboard/
>chmod 755 /Library/WebServer/Documents/ikonboard/avatars
>chmod 755 /Library/WebServer/Documents/ikonboard/emoticons
>chmod 755 /Library/WebServer/Documents/ikonboard/images


The only thing that strikes me is that those newlines should be '\n' and 
not '/n', but I don't think you need them with `echo` anyway, unless 
you're using the '-n' switch.  Do you get an error message when it runs, 
or is it just not doing what it's supposed to?  If you get an error 
message, please post it.

PaulM