BASH - Check that it is not running the same script -


मेरे पास स्क्रिप्ट / रूट / डाटा / माइस्क्रिप्ट

है और जब मैं / root / data / Myscript

मुझे पता नहीं है कि आपके पास एक चल रहा है या नहीं

क्या किसी को पता है?

मैंने कोशिश की

  अगर [["$ (pidof -x / root / डेटा / myscript | wc -w)" & gt; "1"]] तो "यह स्क्रिप्ट पहले से ही चल रहा है!" फाई   

धन्यवाद

यह काम करना चाहिए।

  यदि [["$ (pgrep myscript)"]] तो "यह स्क्रिप्ट पहले से ही चल रहा है!" Fi    

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -