In case you thought that “Unix Wizard” was just an expression…

by Joey deVilla on November 7, 2014

do not disturb the unix wizard

Found via CatsMob. Click the photo to see the source.

That crazy old wizard just typed grep . ./droids.txt | grep -v r2-d2 | grep -v c-3p0!

{ 1 comment… read it below or add one }

1 Yukkuri August 30, 2018 at 7:32 am

Grepping for any symbol (.) is not a very meaningful thing. I guess he just wanted the list of droids without r2-d2 or c-3p0 in their lines. That could be achieved by just using egrep or grep -E: `grep -vE r2-d2|c-3p0 < droids.txt`. Or, more conventionally, sed: `sed '/r2-d2\|c-3p0/' < droids.txt`

Leave a Comment

Previous post:

Next post: