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

slight point #15

Open
NogNoa opened this issue Feb 17, 2020 · 1 comment
Open

slight point #15

NogNoa opened this issue Feb 17, 2020 · 1 comment
Assignees

Comments

@NogNoa
Copy link

NogNoa commented Feb 17, 2020

regarding the unix crash course / Variables and For loops / "grep -w -A 1 ">9" genes.faa"
grep with -w doesn't detect only whitespace but any "non-word constituent character" so anything that isn't alphanumerical or an underscore. This also means adding > to the string is redundant.

(I found it out by chance and then checked the man page. Possibly not universal(?))

@AstrobioMike
Copy link
Owner

Hey look at that! haha, thanks @NogNoa. The man page on darwin (mac) versions isn't as clear, but it still seems to operate the same way. So at least on the ubuntu, redhat, and darwin versions of unix environments i've tested on, it seems to be universal so far :)

I have to think about what to do there now, as i'm not sure how much detail on this should be there, but i definitely need to modify how it is currently because i'm def misrepresenting it at the moment. I think in the end I'll still want the ">" included, because if the headers had spaces and a 9 somewhere in them (which they shouldn't of course, and i've never see that specific format, but any tool can write headers weird, so better safe than sorry), it would still grab that line too, while doing it with the ">" included in the grep pattern it will only grab those at the start, e.g.:
image

But again, it's def misleading/wrong now, and I will revisit it ASAP to clean it up. Thanks for catching and reporting that!

@AstrobioMike AstrobioMike self-assigned this Feb 18, 2020
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