Michael Grünstäudl (Gruenstaeudl), PhD

Postdoctoral Researcher at the Freie Universität Berlin

Life can be so easy if you speak grep

Habla usted grep?

In the phylogenetic analyses of a manuscript draft, I accidentally named a species with the specific epithet “violaceae” where it should have been “violacea”. I had consistently used the wrong epithet for years, and countless subdirectories of subdirectories of subdirectories now contain analysis files that include the incorrect name.

How can this snafu be rectified in a reasonable time?

Recursive grep to the rescue …

grep -rl violaceae . | xargs sed -i 's/violaceae/violacea/g'

… and the world is fine again.

Der Beitrag wurde am Thursday, den 4. March 2021 um 17:22 Uhr von Michael Grünstäudl veröffentlicht und wurde unter bioinformatics, one-liners abgelegt. Sie können die Kommentare zu diesem Eintrag durch den RSS 2.0 Feed verfolgen. Sie können einen Kommentar schreiben, oder einen Trackback auf Ihrer Seite einrichten.

Leave a Reply

Captcha
Refresh
Hilfe
Hinweis / Hint
Das Captcha kann Kleinbuchstaben, Ziffern und die Sonderzeichzeichen »?!#%&« enthalten.
The captcha could contain lower case, numeric characters and special characters as »!#%&«.