[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] Problem med mysqladmin i bash script



On 17 April 2011 14:35, Thomas Rosendal Jensen <sslug@sslug> wrote:

[...]

> #for USRNME in /home/*
> USRARRAY=$(ls -l --format=single-column /home/)
> for USRNME in sslug@sslug

Hej,
  Du behøver altså ikke lave et USRARRAY og du
behøver heller ikke give nogle options til ls med format eller
lign.

Hvorfor disse to linjer og ikke bare min linje:
for USRNME in /home/*
?

>  if [ ! -d ${DIR} ];
>  then
>  mkdir ${DIR}
>  fi

De ovenståender fire linjer kan omskrives til en enkelt linie:
[ -d $DIR ] || mkdir $DIR

Det gør det også mere læsligt.


> # for USRDOMN in /home/${USRNME}/PUBLIC_HTML/*
>  USRDOMNARRAY=$(ls -l --format=single-column /home/${USRNME}/PUBLIC_HTML/)
>  for USRDOMN in sslug@sslug

Igen. Ganske unødvendigt. Min ene linje er nok og nemmere at
læse.

>  do
>  LNK=${USRDOMN}.${USRNME}.${MNDOMN}
>  UNDERSCORENAME=${USRDOMN}_${USRNME}_${MNDOMNUNDERSCORE}

LNK=$USRDOMN.$USRNME.$MNDOMN
Der er ikke brug for alle de { }.

Mvh
Martin


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2011-05-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *