I need some help from the wise-guys of Arizona.

der.hans PLUGd at LuftHans.com
Fri Mar 6 23:39:16 MST 2015


Am 06. Mär, 2015 schwätzte Michael Havens so:

moin moin Mike,

when using regular expressions '$' matches the end of the line and '^'
matcheѕ the beginning of the line. So, '^$' matches a blank line.

grep -E '^fred:' /etc/passwd # shows the entry for fred's account

grep -E ':/bin/bash$' /etc/passwd # shows all of the accounts that have
bash as their shell

ciao,

der.hans

> I'm going through the BASH manual at The Linux Documentation Project and
> was going over special characters. They say that 'a "$" addresses the end
> of a line bash'. Huh; what does that mean? You see on my blog that I had
> another special character I was wondering about but my web search revealed
> to me what was hidden. My web search in this case turns up a lot of stuff
> too. None of it relevant though. Could you wonderful people of Plug remove
> the scales from my eyes?
> :-)~MIKE~(-:
>

-- 
#  http://www.LuftHans.com/        http://www.PhxLinux.org/
#  "Metrosexuals notwithstanding, quiche still lacks something." -- David Brin


More information about the PLUG-discuss mailing list