I had previously just looked at the man page (which doesn't mention this way of specifying multiple patterns except for use in fixed string mode, though it mentions giving multiple -e PATTERN options). You're right, the info documentation mentions this. So I tried
Code:
ls -l|grep -E '^lrwx.*
\.db$
w{3}-data'
and got the expected results
Code:
-rw-r--r-- 1 holgeh holgeh 145408 Sep 16 2017 ereader.db
lrwxrwxrwx 1 holgeh holgeh 38 Nov 8 2019 PlayOnLinux's virtual drives -> /home/holgeh/.PlayOnLinux//wineprefix/
drwxrwxr-x 19 holgeh www-data 4096 Jul 10 15:19 public_html
The one thing I did differently from you was that I didn't put in '\n'. To grep '\n' doesn't have any special meaning, it would search for a literal 'n'.
Holger
Bookmarks