bash - How to pass output as arguments to another command? -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 2 जवाब

    मैं एक आदेश का उपयोग कर रहा हूँ, <पूर्व> gsettings2 मॉनिटर org.gnome.desktop.background चित्र-यूरी | कट -f2 -d "'"

    यह सही ढंग से बदला हुआ वॉलपेपर के लिए यूरी देता है। मैं फ़्यूचर फ़ू जैसे प्रत्येक मान को पाइप करना चाहता हूं जैसे कि

      function foo {echo "value changed $ 1"}   

    चलाता है। मैं इसे कैसे करूँ?

      gsettings2 ... | Stdbuf -oL कट -f2 -d "'" | जबकि पढ़-आर यूरी;   लूप कॉल  foo  को पढ़ने के लिए जब प्रत्येक यूआरआई पढ़ता है तो   

    stdbuf-oL कॉल लाइन को बफर करने के लिए cut बल को लागू करने के लिए है, इसलिए इसका आउटपुट तुरंत दिखता है।

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -