I want to apply the following command to all the files in the current directoryclustalw -align -infile=*here goes the input filename* -outfile=*here goes the output filename*I also want the output filename to be the same as the input plus .aln. For example:clustalw -align -infile=nexus0000.fna -outfile=nexus000.fna.alnThanks for the help!
Apply command to all files in a directory
shell script;files;scripting
You could use for loop and globbing by filename extension:for file in *.fna; do    clustalw -align -infile=$file -outfile=$file.alndoneIf you want to use a single command, you can use find:find . -maxdepth 1 -type f -iname *.fna -exec clustalw -infile {} -outfile {}.aln  \;