Current version

May 14, 2015 2:29 PM
@Stacey Yes. The single quotes prevent shell expansion, so for example \.code would pass .code to grep (because the shell expands \. to .), whereas '\.code' passes \.code to grep. Using .code or '.code' passes .code to grep, and . is a regexp metacharacter.
 

Message history

May 14, 2015 3:58 PM
edited: :21635331 Yes. The single quotes prevent shell expansion, so for example `\.code` would pass `.code` to grep (because the shell expands `\.` to `.`), whereas `'\.code'` passes `\.code` to grep. Using `.code` or `'.code'` passes `.code` to grep, and `.` is a regexp metacharacter.
 
May 14, 2015 2:29 PM
said: :21635331 Yes. The single quotes prevent shell expansion, so for example `\.code` would pass `.code` to grep (because the shell expands `\.` to `.`), whereas `'\.code'` passes `.code` to grep. Using `.code` or `'.code'` passes `.code` to grep, and `.` is a regexp metacharacter.