[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: [NOVICE] bash



Hans Schou wrote:

> jeg har følgende script som nok kunne gøres lidt smartere,
> men lad nu det ligge
> -------------------------
> #!/bin/bash
> ls r*.jpg | while read FILE
> do
>  echo $FILE
>  convert -geometry 120 $FILE s$FILE
> done

tja:
for FILE in r*.jpg
do
  echo $FILE
  convert -geometry 120 $FILE s$FILE
done

> -------------------------
> 
> 1. Kan man tælle på variable?
>    x = x +1
>    if x == 3 then
>      x = 0
>    end if

i bash med "let" funktionen:
 let x=$x+1
 let x=$x+1
 if [ $x = 3 ] ; then
   x=0
 fi
 

> 2. Er der en modulus funtion?

Check i "man bash" under let eller expression, der er vist
en "rest" funtion fra division.

> 
> Hvis bash kan ovenstående, kan jeg hurtigere få publiseret
> Linus Demo Day billeder imorgen.

Ups...



-- 
mvh Frank Damgaard  sslug@sslug | sslug@sslug |fido  2:236/15.2


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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