2009-06-13 11 views

उत्तर

16

आप विशेष फ़ाइल नाम - का उपयोग करके एक फ़ाइल के साथ मानक इनपुट diff कर सकते हैं:

# diff the contents of the file 'some-file' with the string "foobar" 
echo foobar | diff - some-file 
बैश के साथ

, आप भी गुमनाम नामित पाइप (एक मिथ्या नाम का एक सा) का उपयोग कर सकते

# diff the string "foo" with the string "baz" 
diff <(echo foo) <(echo baz) 

भी How can you diff two pipelines with bash? देखें: दो पाइपलाइनों diff करने के लिए।

+0

++ मुझे इसे मारो। – guns

संबंधित मुद्दे