[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 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


"find" kan også lave en liste directories til stdout,
f.eks. brugt af read i løkke :

   find /home/* -maxdepth 0 -type d | \
     while read mydir ; do
	echo "$mydir"
     done

(tilpas maxdepth til den dybde du har brug for)



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