I'm writing a shell script that will have problems if another instance of itself is running, and I'd like to be able to trap that the user has started multiple instances. I've tried cnt=`ps ax | grep -c xyz` where xyz is the name of the script. It returns 3 when there is only one instance running. I think I understand why it's 3 (one for the script itself, one for it running ps and one for it running grep?). Will this always work? Is there a better way?
- [expert] WYSYWYG for latex under linux falcaraz
- Re: [expert] WYSYWYG for latex under linux Praedor Tempus
- Re: [expert] WYSYWYG for latex under linux Declan Moriarty
- Re: [expert] WYSYWYG for latex under linux Gary
- Re: [expert] WYSYWYG for latex under linux Declan Moriarty
- Re: [expert] WYSYWYG for latex under linu... Gary
- Re: [expert] WYSYWYG for latex under... Declan Moriarty
- Re: [expert] shell programming question Karl Cunningham
- Re: [expert] shell programming question John Wolford
- Re: [expert] shell programming question Dan Woods
- Re: [expert] shell programming question John Wolford
- Re: [expert] shell programming question Karl Cunningham
- Re[2]: [expert] shell programming qu... Rusty Carruth
- Re[2]: [expert] shell programmin... Karl Cunningham
- RE: Re: [expert] WYSYWYG for latex under linux falcaraz
- RE: Re: [expert] WYSYWYG for latex under linux falcaraz
