I'm sure there's an elegant awk solution out there but here's my somewhat shitty loop for it. It assumes all files keep the same structure as the ones you've posted.
for f in *_coding.fasta; do new="$(echo $f | tr '=' '_' | cut -d '_' -f 5)"; mv $f $new.fasta; done
ADD COMMENT
• link
updated 5.7 years ago by
Ram
45k
•
written 9.7 years ago by
Jenez
▴
540