[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: VEDR: Re: [TEKNIK] Automatisk fremstilling af MySQL Databaser som root i BASH



On Friday, 22 April 2011, Frank Damgaard <sslug@sslug> wrote:
> On 2011-04-22 10:58, sslug@sslug wrote:
>  ....
>
>>
>> Men hvis man nu kunne få ls til kun at komme med mapper vil det være
>> bedre. Her tænker jeg på den inderste løkke.
>>
>
> nu ved jeg ikke lige hvilken inderste løkke du tænker på,
> men du man da teste for directory med -d  :
>
>  maybedir=.......
>  if [ -d "$maybedir" ] ; then
>      .....
>  fi

Ja og evt. straks tage næste element i listen med continue, hvis
variablen f ikke peger på et directory. F.x.

for f in /home/*
do
   [ ! -d "$f" ] && continue
   echo $f
done

Hilsen Martin



-- 
-- 
Til uvedkommende, der læser med: Der er ingen grund til at læse min
mail. Jeg har intet at gøre med FARC, al-Jihad, al-Qaida, Hamas, Hizb
al-Mujahidin eller ETA. Jeg har aldrig gjort Zakat, går ikke ind for
Istishad, har ikke lavet en bilbombe eller kernevåben og jeg ved
dårligt nok, hvad Al Manar og бомба betyder.  Men tak for den udviste
interesse.


 
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] *