Other Help Topics :: Script help needed please



mikshaw, Your Bash skill never fail to wow me.  I'd swear I get something new out of every example.  I really liked the use of variables to hold the parts, so that it would be easy to change things.

I think the reason that the script was putting things into /root instead of /home/dsl was because if you are running the script as user root $HOME=/root whereas running it as user dsl $HOME=/home/dsl

adding the full path worked just fine. Thanks alot for your help. I'll do some test installs this evening.

I have you noted in the code.  :D

Chris

ok then, I wasn't aware that you were running it as root.  Instead of "$HOME/`basename $DOCDIR`" it could be "/home/dsl/`basename $DOCDIR`".  When you said that the symlink was put in the root directory I thought you meant '/' when you actually meant '/root'.  That makes sense.

Variables, in my opinion, are the most useful element in scripting.  Not only do they allow you to easily modify set values in scripts, but they are also used a lot when you need to get a value which may vary depending on the environment, hence the name 'variable'.  I had my first taste of them doing actionscript in Flash 4.  After doing several projects with Flash3 (no variables) and making everything linear and specific, the introduction of variables opened up a whole new world of user interaction.


original here.