Venga now - the commands I always forget
Friday, 18 January 2013
How to grep a variable in bash?
export var='chr1'
grep -P ^$var'\t' file.to.grep
This will grep the lines that begin with chr1 followed by a tab. This ignores cases as chr11 or chr19
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment