On Sat, May 15, 2004 at 06:31:18AM -0400, richard lyons wrote:
> BTW, why "grep '^ii.*'". WHat does the ".*" usefully add?

Nothing.

> and the single quotes?  I expected, and got, the same response with
> either or both omitted.

'*' is a metacharacter to the shell: if you'd happened to have any files
in the current directory whose names started with '^ii.' for whatever
reason, or if you had the shell option 'nullglob' set, then "grep ^ii.*"
would have gone wrong. You may feel this is unlikely, but it's good
style to quote metacharacters nonetheless.

There are no metacharacters in ^ii alone, so quoting there is
unnecessary.

-- 
Colin Watson                                  [EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to