Changes

Jump to: navigation, search
Quoting Special Characters
Like discussed in the above section, there are some special characters that the shell uses to perform<br>an operation; for example, the filename expansion symbols: '''*''' or '''?'''
'''Question:''' what if you want the shell There are 3 methods to treat make those special characters as just behave like only text and not perform those operations?<br>'''Answer:''' You can quote out those special characters. There are 3 ways in which you can quote out (referred to "quoting" special characters):
<table cellpadding="5"><tr><th style="border-bottom: 1px solid black;text-align:left;">Filename Expansion Symbol</th><th style="border-bottom: 1px solid black;text-align:left;">Example</th></tr><tr><td>'''Place \ before special character'''</td><td><span style="font-family:courier">'''echo \*'''</span></td></tr><tr valign="top"><td>'''Contain special characters with double-quotes'''<br>'''NOTE:''' Double quotes works for most special characters,<br>but not all like $<br></td><td><span style="font-family:courier">'''echo "* hello *"'''</span></td></tr><tr><td>'''Contain Special character within single quotes'''</td><td><span style="font-family:courier">'''echo '* hello *''''</span></td></tr></table>
13,420
edits

Navigation menu