Hi all,
I have multiple files that have the same (long) title format: Lactococcus_lactis_subsp_cremoris_strain_number_file.gbk_fasta.fasta_proteins.fasta_results
I want to delete everything after ".fasta" so it would be something like:
Lactococcus_lactis_subsp_cremoris_strain_number_file.gbk_fasta.fasta
I tried to make a small bash script in order to do that quickly but when I run it, nothing is changing. Here is my script:
#!/bin/bash
for file in /home/Documents/Folder;
do
cut -d_ -f1,2,3,4,5,6,7,8 <<< "$f";
done
There is obviously something wrong with it but I can't find where.
If you have any ideas/suggestions for improvements, please, let me know.
Thank you for your help!
Thank you so much RamRS for your help! I run the following script and it worked great:
Thank you again, have a nice day.