[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 finder jeg det næste tal?



On Tuesday 09 May 2006 23:08, Henrik Storner wrote:
> for X in ~/EtDir/temp/temp*
> do
>     XNUM=`basename $X | sed -e 's/^temp//'`
>     echo "Tallet er $XNUM"
> done

Det blev godt nok til 

cd ~/pictures/temp/
for X in temp*
do
  XNUM=`basename $X | sed -e 's/^temp//'`
  echo "Tallet er $XNUM"
done

Men det giver en 'command not found' fejl for begge de 2 linier i løkken. Det 
samme er tilfældet for løkke når den sådan ud:

for X in ~/pictures/temp/temp*
do
  XNUM=`basename $X | sed -e 's/^temp//'`
  echo "Tallet er $XNUM"
done

Både sed og basename findes i min sti.

Fejlbeskeden ser helt præcis sådan ud:

./test2.sh: line 16:  : command not found
./test2.sh: line 17:  : command not found

-- 

        |\     _,,,---,,_       Greetings, Jens
 ZZZzz /,`.-'`'    -.  ;-;;,_
      |,4-  ) )-,_. ,\ (  `'-'  sslug@sslug
     '---''(_/--'  `-'\_)
----------------------------------------------------
If you want it done right, forget Microsoft.


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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