This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mauve Contig Mover

Dear all, I am using mauve contig mover through command line .I have a question: once i am running mauve contig mover i am getting n number iteration for each run and for each run mauve generate one folder name alignment1, alignment2.....alignmentN . Now i want only final iteration result, from command line after running mauve how i will automatically go to that folder and pass the result to another folder in different location.Kindly help me out.

Thank you.

Regards

Hiren

1 answer

Assuming your in the directory containing the files alignment1...alignmentN the following command can be used to find the newest folder and copy whatever contents you want from it to another location.

newest=$(ls -1 -t | head -n 1); cp $newest/<FILES TO COPY> <DEST_FOLDER>

NOTE: this assumes that there is no other file/folder in the directory that was modified after the mauve command, so it's not foolproof

CTS Thank you so much ..........you are really great .....can you please suggest me some shell script good tutorial or book .....

Log in to answer this question.