[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash syntax




If the parent doesn't exist, you can use
	mkdir -p $HOMEDIR
That will make the directory and any parents that don't exist yet.

--Danny, who wishes everything had perl's -w switch :)

On Tue, Jun 20, 2000 at 12:05:34PM -0500, Charles Menzes wrote:
> 
> gotcha on the chown syntax, however, the mkdir isnt happening either.
> 
> cjm
> 
> On Tue, 20 Jun 2000, Danny Sauer wrote:
> 
> > 
> > On Tue, Jun 20, 2000 at 10:15:41AM -0500, Charles Menzes wrote:
> > > Can someone tell me if this is just incorrect syntax that is causing this
> > > not to work:
> > 
> > yes.
> > 
> > > #!/bin/bash
> > > USER="rufus"
> > > HOMEDIR="/home/test/rufus"
> > >         if [ -z $HOMEDIR ]; then
> > >                 mkdir $HOMEDIR
> > >                 chmod 755 $HOMEDIR
> > >                 chown $HOMEDIR $USER
> > >         fi
> > > #
> > > #
> > 
> > chown $USER $HOMEDIR
> > 
> > (I'd also have used HOMEDIR="/home/test/$USER", but that's just me)
> > 
> > --Danny
> > 
> > --
> > To unsubscribe, send email to majordomo@luci.org with
> > "unsubscribe luci-discuss" in the body.
> > 
> 
> 
> --
> To unsubscribe, send email to majordomo@luci.org with
> "unsubscribe luci-discuss" in the body.
> 

--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.