An RE is an RE, well almost. In all three cases the RE would be the
same, just delimited differently.
To_Char.*YYYY
If the strings can occur in either order you need the RE set of egrep
and awk.
(To_Char|YYYY).*(To_Char|YYYY)
> I need some help: how can I use either
> sed or awk to look for a combination
> of patterns in a text file?
> For. ex I need to find all occurrences
> of "To_Char" AND "YYYY" on the same line.
> There might be some other irrelevant stuff
> in between.
> grep won't do it since it will find only
> one of these patterns.
> I'm using bash as a shell.
> Thanks for any answers
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Consulting wrong with a world in which Ken
Modeling Thompson lives in obscurity and
Training Bill Gates is a famous billionaire.
//////////////////////////////////////////////////////////////////////