Created
May 19, 2021 16:28
-
-
Save chbrandt/a3cad4ef448e4220567cfd3665b2214c to your computer and use it in GitHub Desktop.
Clean Conda init from bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
awk '/>>> conda initialize >>>/ {p=1}; /<<< conda initialize <<</ {p=0; next}; {if (p==0) print $0}' .bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Filter block of text/lines between
>>> conda initialize >>>
and<<< conda initialize <<<
(inclusive):print everything else BUT the block.
For example, part of my
.bashrc
:Would print: