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

bug: minor issues in the grep chapter #70

Open
dwmkerr opened this issue Dec 1, 2020 · 0 comments
Open

bug: minor issues in the grep chapter #70

dwmkerr opened this issue Dec 1, 2020 · 0 comments

Comments

@dwmkerr
Copy link
Owner

dwmkerr commented Dec 1, 2020

On zsh systems the history file might be smaller. Replace ~/.bash_history with $HISTFILE

Let's break this down. First, we use the -E flag to tell grep to use Extended Regular Expressions. This allows us to use some clever constructs to search for text.

I know what you want to say, but factually this is wrong. You can use history | grep "[0-9]+ man" to achieve exactly the same effect ('use some clever constructs').
Suggestion: Use the history | grep "\[0-9\]+ man" version first, explain briefly it's a different dialect and then introduce the '-E' switch to get back to familiar territory (history | grep -E "[0-9]+ man").

For familiar uses, grep becomes a

Potential typo. 'users'?

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

1 participant