Preexec and multiple commands

Alastair Broom
1999-10-20T11:46:08Z

On Wed, 20 Oct 1999, Robert Jonsson wrote:

> I am trying to create two directories using the preexec command but I must
> be missing something very simple. I just can?t figure out the syntax. How
> would I continue this so that I could create dir2?
>
> preexec = if [ ! -e /home/%U/dir1] then /bin/mkdir /home/%U/dir1; fi
>
If it actually is a syntax error you have, try:
  preexec = if [ ! -e /home/%U/dir1 ]; then /bin/mkdir /home/%U/dir1; fi
Hope this helps...                 ^ ^
--
Alastair Broom               Valley Technology, Edinburgh, Bonnie Scotland
abroom@valleyt.co.uk