[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: [PROGRAMMERING] Hvordan undgår man expa ndering i et bash-script? SOLVED



On Tue, 24 Jun 2008, Kristian Nørgaard wrote:

Men det virker vel kun hvis der ikke er filnavne der begynder med "x"?

Prøv at copy/paste på kommandolinjen:
cat > x
set -x
if [ "x*" = "x*" ]; then
        echo det virker
fi
if [ x* = x* ]; then
        echo det virker ikke
fi

afslut med kontrol-D og skriv:
touch xx ; sh x

Så burde du kunne se hvad der gå galt i nummer 2 test.

/hans
--
Horsebakken 78, DK-2400 København NV, Phone: +45 2264 8020
-------------------------------------------------------------


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2008-07-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] *