The two ^'s around $user are rc(1) syntax to concatenate the three strings into one argument.  I don't think they are strictly necessary.
grep never sees them

On 12. Sep 2026, at 19:20, [email protected] wrote:


Still trying to figure out how to be both precise and concise and searchable with my topics.
Two more to come shortly, that are much more important.

Page 217 contains the following, near the bottom:

; grep -s '^[^:]+:'^$user^':' /adm/users && echo $user exists

I think I understand it pretty well, except for the ^'s around $user.  I tried removing them,
but suspect that that just produced a different command that happened to have the same output.

The best I can come up with now is that the instruction searches for a line that starts with one or more of anything that isn't :, followed by : ... and that the ^ before $user means that $user appears immediately after the last matched :, as if the first string that got matched has now been cut-off of the rest of the string, so that ^ refers to the beginning of the -rest- of the string.  And that the same logic applies to the ^ before ':'.  That logic seems a bit crazy to me, but -would- explain that _expression_.

Reply via email to