Hi all,
I was working on the Linux box A and I run this:
grep '^\S*\s-' access_log
That displayed some lines, as expected.
Then I moved to the machine B and I launched exactly the same command. But this time it didn't work.
I had to launch this in order to get done what I needed:
grep '^[^ ]* -' access_log
Before succeeding, I tried all of these but with no luck:
grep '^\S* -' access_log
grep '^\S*\s-' access_log
grep -e '^\S* -' access_log
grep -E '^\S* ' access_log
It looks like machine B doesn't understand the metacharacters \S and \s.
Both of the boxes were running: grep 2.5.1 and bash 3.2.25
How is that possible?
Cheers, Dan