replace multiple patterns from a file
Hi all,
I have a fasta file that looks like this Code:
Code:
>consensus_5353 I knew how to use sed to delete a single pattern but how to delete multiple patterns from a file instead of writing something like this sed -e '/pattern/d' -e '/pattern/d' file Thanks in advance. |
sed s/pattern//g input > output
Probably not the best way to do it but it works. |
Here is a script that might help.
Please note that I have used sed with "-i" so it will change your actual file. It is preferable you try this script on a backup file to make sure things don't go wrong. Code:
|
Quote:
|
All times are GMT -5. The time now is 04:25 AM. |