 AND?

          grep 'paul' /etc/motd | grep 'franc,ois'

     finds all lines that contain both `paul' and `franc,ois'.

 11. How can I search in both standard input and in files?

     Use the special file name `-':

          cat /etc/passwd | grep 'alain' - /etc/motd

 12. How to express palindromes in a regular expression?

     It can be done by using back-references; for example, a palindrome
     of 4 characters can be written with a BRE:

          grep -w -e '\(.\)\(.\).\2\1' file

     It matches the word "radar" or "civic".

     Guglielmo Bondioni proposed a single RE that finds all palindromes
     up to 19 characters long using 9 subexpressions and
     9 back-references:

          grep -E -e '^(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?)(.?).?\9\8\7\6\5\4\3\2\1$' file

     Note this is done by using GNU ERE extensions; it might not be
     portable to other implementations of `grep'.

 13. Why is this back-reference failing?

          echo 'ba' | grep -E '(a)\1|b\1'

     This gives no output, because the first alternate `(a)\1' does not
     match, as there is no `aa' in the input, so the `\1' in the second
     alternate has nothing to refer back to, meaning it will never
     match anything.  (The second alternate in this example can only
     match if the first alternate has matched - making the second one
     superfluous.)

 14. What do `grep', `fgrep', and `egrep' stand for?

     The name `grep' comes from the way line editing was done on Unix.
     For example, `ed' uses the following syntax to print a list of
     matching lines on the screen:

          global/regular expression/print
          g/re/p

     `fgrep' stands for Fixed `grep'; `egrep' stands for Extended
     `grep'.


