[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] Hvorfor er 0 == 1? SOLVED



On Tue, 11 Sep 2007 19:44:57 +0200
Jens Bang <sslug@sslug> wrote:

> On Tuesday 11 September 2007, Jørgen Heesche wrote:
> > Jens Bang wrote:
> > > On Monday 10 September 2007, Jørgen Heesche wrote:
> > >> #/bin/bash
> > >> FileCount=0
> > >> for X in $(ls -d backup* 2> /dev/null)
> > >> do
> > >>      FileCount=$((FileCount+1))
> > >> done
> > >> echo FileCount=$FileCount
> 
> [Snip Snip Snip]
> 
> > Hvordan se din linie 5 ud?. Det ser ud til at der står et enligt
> > semikolon, som så opfattes som en kommando.
> 
> Den ser ud som du ser den ovenfor. Som jeg skrev: Jeg markerede hele
> scriptet og kopierede det (med copy/paste) over i en fil.
> 
> For jer der gerne vil putte forskellige fejl ind i linie 5 er her en 
> copy/paste den anden vej (Ja, jeg har indsat det manglende udråbstegn
> efter at have læst Martins mail).  :-)
> 
> 
> #!/bin/bash
> FileCount=0
> for X in $(ls -d backup* 2> /dev/null)
> do
>   FileCount=$((FileCount+1))
> done
> echo FileCount=$FileCount
> 
> 
> Selv med udråbstegnet får jeg fejlen.
> 

Hvis jeg copy&paster herfra ind i emacs får jeg en lille "pudsighed"...

I linien FileCount=$((FileCount+1)) kommer der foran det hele et lille
"_" (underbar)

Fjern den og så virker det.

Mvh
Jesper K. Pedersen


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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