ऑनवर्क्स लिनक्स और विंडोज ऑनलाइन वर्कस्टेशन

प्रतीक चिन्ह

वर्कस्टेशन के लिए मुफ्त होस्टिंग ऑनलाइन

<पिछला | विषय-सूची | अगला>

एकल कोट

If we need to suppress सब expansions, we use एकल कोट. Here is a comparison of un- quoted, double quotes, and single quotes:



[मुझे@लिनक्सबॉक्स ~]$ echo text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER

text /home/me/ls-output.txt a b foo 4 me

[मुझे@लिनक्सबॉक्स ~]$ echo "text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER"

text ~/*.txt {a,b} foo 4 me

[मुझे@लिनक्सबॉक्स ~]$ echo 'text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER'

text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER

[मुझे@लिनक्सबॉक्स ~]$ echo text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER

text /home/me/ls-output.txt a b foo 4 me

[मुझे@लिनक्सबॉक्स ~]$ echo "text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER"

text ~/*.txt {a,b} foo 4 me

[मुझे@लिनक्सबॉक्स ~]$ echo 'text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER'

text ~/*.txt {a,b} $(echo foo) $((2+2)) $USER


As we can see, with each succeeding level of quoting, more and more of the expansions are suppressed.


OnWorks पर शीर्ष OS क्लाउड कंप्यूटिंग: