[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: [TEKNIK] number of me - script problem



Martin Møller Skarbiniks Pedersen <sslug@sslug> writes:

> 2010/4/15 Martin Dupont Ahrentsen <sslug@sslug>:
>> Martin Møller Skarbiniks Pedersen skrev:
>
>> Prøv med :
>>
>> NUM_OF_ME=`ps -ef | grep [n]um_of_me.sh | wc -l`
>> echo $NUM_OF_ME
>>
>>
>> if [[ $NUM_OF_ME -gt 1 ]] ; then echo already running ; exit ; fi
>>
>>
>
>
> Øh. Det giver da ingen forskel.
>
> Flg. scriptet giver 3 på min linux og 2 på min opensolaris.

Nej, men det var heller ikke det Martin Ahrentsen forslog. Bemærk
klammerne omkring n'et som gør at grep-kommandoen ikek selv bliver
matchet.

> Hvordan checker jeg korrekt på en virkårlig unix i et bash-script at
> der kører præcist en udgave
> af scriptet ?

Du bruger lockfile(1) som følger med procmail eller implementerer
noget tilsvarende.

//Makholm


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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