Ralph Shumaker wrote:
James G. Sack (jim) wrote:

Ralph Shumaker wrote:

I suppose that "\|" in your suggested command translates to OR .  I use
bash on fc4.  If it was supposed to do something different than what I
supposed, tell me and I'll retry.



No, you were "supposed to" type both of the characters '\' and '|', but
it doesn't make any difference because you improvised correctly to run
two commands (one with cups, one with lpd), and confirmed that cupds
_is_ running and there is not any lpd running.


I didn't "type" anything. I used cut and paste to put your command (as *you* typed it) directly to the bash command line. It didn't work, so I /surmised/ that the '\' was escaping the '|' to allow it to mean "OR" to allow a dual search in one shot.


Interesting(?) aside..
My format,
  grep cups\|lpd
was intended to check for either match in one call, but my advice was
wrong anyway -- I should have used egrep, because grep doesn't do
alternatives (egrep does). I should have said
  egrep cups\|lpd
or equivalently
  egrep 'cups|lpd'
The significant point here is that '|' normally has special meaning to
the shell, and either the '\' escaping or the '...' quoting prevents the
shell from interpreting special characters.


As I surmised.



Sorry, I didn't realize I sounded so uppety.

(egrep sure does work a lot better in that command sequence.)


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to