{"action":"closed","issue":{"url":"https://api.github.com/repos/MOLB7621/Discussion/issues/7","repository_url":"https://api.github.com/repos/MOLB7621/Discussion","labels_url":"https://api.github.com/repos/MOLB7621/Discussion/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/MOLB7621/Discussion/issues/7/comments","events_url":"https://api.github.com/repos/MOLB7621/Discussion/issues/7/events","html_url":"https://github.com/MOLB7621/Discussion/issues/7","id":132844293,"number":7,"title":"Grep in-class excercise#1","user":{"login":"ericlarson84","id":16615510,"avatar_url":"https://avatars.githubusercontent.com/u/16615510?v=3","gravatar_id":"","url":"https://api.github.com/users/ericlarson84","html_url":"https://github.com/ericlarson84","followers_url":"https://api.github.com/users/ericlarson84/followers","following_url":"https://api.github.com/users/ericlarson84/following{/other_user}","gists_url":"https://api.github.com/users/ericlarson84/gists{/gist_id}","starred_url":"https://api.github.com/users/ericlarson84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericlarson84/subscriptions","organizations_url":"https://api.github.com/users/ericlarson84/orgs","repos_url":"https://api.github.com/users/ericlarson84/repos","events_url":"https://api.github.com/users/ericlarson84/events{/privacy}","received_events_url":"https://api.github.com/users/ericlarson84/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-10T23:05:00Z","updated_at":"2016-02-15T14:36:28Z","closed_at":"2016-02-15T14:36:28Z","body":"\"use grep to identify lines in lamina.bed where the second field (start) begins with 100.\"\r\n\r\n```\r\ncut -f2 lamina.bed | grep '^100' \r\n```\r\n\r\nWhile this seems to work, it just dumps out the column 2 value starting with 100.  What if I wanted the output to show which chromosome each line was on?  \r\n\r\nI think what I want is to \"grep\" lines where column 2 starts with 100.  Am I just forgetting an option for 'grep'?\r\n\r\nI was able to do using awk to simply reorder the columns, but it seems a bit convoluted.\r\n```\r\ncat lamina.bed | awk '{print $2,$3,$4,$1}' | grep '^100'\r\n```\r\n"}}