[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



Jens Bang 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.

Ja, men fejlmeddelelsen siger:
    : command not found
Der er altså et :
Og dette kolon bliver opfattet som en kommando.
Prøv at slette linien og taste den ind igen.
Eller skriv hele scriptet om uden at bruge copy/paste.

--
Med venlig hilsen

Jørgen Heesche
mailto:sslug@sslug


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