No, but thanks. I am fairly new at scripting. Like maybe 2 days.
Quote:
Originally Posted by
danmero
---------- Post updated at 02:21 PM ---------- Previous update was at 02:06 PM ----------
Another dumb question. The man pages state:
Two regular expressions may be joined by the infix operator |; the
resulting regular expression matches any string matching either subex-
pression.
I tried several times to grep for multiple items, do you have an e.g.?
[henry@impala ~]$ man grep
[henry@impala ~]$ cat junk.log|grep [hello|this]
grep: Unmatched [ or [^
bash: this]: command not found
[henry@impala ~]$ cat junk.log|grep [hello|;this]
bash: syntax error near unexpected token `;'
[henry@impala ~]$ cat junk.log|grep hello|;this
bash: syntax error near unexpected token `;'
[henry@impala ~]$ man grep
[henry@impala ~]$ cat junk.log|grep hello|this
bash: this: command not found
[henry@impala ~]$ grep -ci "hello|this" junk.log
0
[henry@impala ~]$ grep -ci hello|this junk.log
bash: this: command not found
[henry@impala ~]$ grep -ci hello;this junk.log
bash: this: command not found