Skip to content

Commit a7b86c1

Browse files
Merge pull request #284 from LibraryCarpentry/instructor-note-grep-PE
Add an inline Instructor Note warning about different flag behaviour
2 parents cedd8b1 + 5ef86c3 commit a7b86c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

episodes/05-counting-mining.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,16 @@ $ grep -iw hero *a.tsv > results/hero-i.tsv
649649

650650
::::::::::::::::::::::::::::::::::::::::::::::::::
651651

652+
:::::::::::::::::::::::::::::::::::::::::::::::::: instructor
653+
654+
### Watch out for different behaviour of the -E option across systems
655+
656+
Learners may encounter some inconsistent behaviour between operating systems when solving the challenge below.
657+
`grep -E` on macOS acts like `grep -P` on other platforms.
658+
On Windows and Linux, `grep -E` is halfway between `grep -P` and `grep`: it only does what `grep` can do, but uses Perl-compatible syntax to do it.
659+
660+
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
661+
652662
::::::::::::::::::::::::::::::::::::::: challenge
653663

654664
## Searching with regular expressions

0 commit comments

Comments
 (0)