40.4k views
5 votes
What Shell character do you use around a string to ignore every special character in the string except $ and ?

a) `!`
b) `'`
c) ``
d) `*`

1 Answer

2 votes

Final answer:

The shell character you can use to ignore every special character in a string except $ and ' character.

Step-by-step explanation:

The shell character that you can use to ignore every special character in a string except $ and ? is the ' character. When you enclose a string in single quotes, all special characters within the string, except $ and ?, are treated as literal characters and not as special characters with their usual meaning in the shell. For example, if you have a string like 'Hello!$World?', the shell will treat the entire string as a single unit, including the special characters $ and ?.

User Farhan Patel
by
8.7k points