Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Let's start with the good old debian
- root@debian:~# echo -e 'hello\ntest\ntest test' | grep '.*\s.*'
- test test
- root@debian:~# echo -e 'hello\ntest\ntest test' | grep '\s'
- test test
- # So far so good, let's switch to the FreeBSD box
- [root@freebsd ~]# echo -e 'hello\ntest\ntest test' | grep '.*\s.*'
- test test
- [root@freebsd ~]# echo -e 'hello\ntest\ntest test' | grep '\s'
- test
- test test
- # Wtf is that 'test' match in the last command? Looks as if it matches plain 's' in this case.
- # Lets try some switches. According to the man, the sensible ones are only -P, -F and -E, but -P is not supported
- [root@freebsd ~]# echo -e 'hello\ntest\ntest test' | grep -P '\s'
- grep: The -P option is not supported
- [root@freebsd ~]# echo -e 'hello\ntest\ntest test' | grep -E '\s'
- test
- test test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement