[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
 

mellemrum i bash



Hej,

Jeg havde gang i at skrive et shellscript, men er gået i stå ved et problem som jeg efter mange forsøg med alverdens programmer ikke har kunnet finde ud af at omgå.
Det er i en for-løkke at problemet viser sig.

for x in $(ls)
do
  echo $x
done

Hvis filerne indeholer et mellemrum bliver de cuttet i mellemrummet og bliver delt over 2 variable.
Jeg synes efterhånden at jeg kan man-filen til bash udenad. Hvordan får jeg en variabel til at indeholde en streng med et mellemrum i? Nogen der har nogen erfaringer med den slags?

/Thomas


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 21:38 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] *