Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

step6 having trouble grepping #310

Closed
bryonywatson1 opened this issue Oct 15, 2016 · 2 comments
Closed

step6 having trouble grepping #310

bryonywatson1 opened this issue Oct 15, 2016 · 2 comments

Comments

@bryonywatson1
Copy link

bryonywatson1 commented Oct 15, 2016

I am really struggling to figure out what the right code is to grep multiple pieces of text in the vehicles file. I have tried piping so
grep -A 5 'L377' mystery/vehicles | grep -B 1 -A 4 'Honda' | grep -B 2 -A 3 'Blue' | grep -B 4 -A 1 'Height: 6' >> suspects.txt
but nothing appears in suspects.txt
I'm definitely missing something! Can anyone help?

@malinpatel
Copy link

I did grep L337 | grep -A 4 -B 1 Honda | grep -A 3 -B 2 Blue | grep -A 1 -B 4 'Height: 6'

@bryonywatson1
Copy link
Author

@malinpatel thank you! Have just worked out where I was going wrong :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants