Entering edit mode
4.7 years ago
mrmrwinter
▴
30
Im trying to write an if-else loop that does the following
grep -c ^">" <file>
If results of grep are >0, move file to location1 Else move file to location 2
So far i have:
def numfasta = grep -c ^'>' {input} if [[ $numfasta -gt 0 ]] ; then mv {input} {output.denoise} else mv {input} {output.rerep} fi
but this is not working
Thanks
In the future please highlight code with the format bar.
Will do in future, sorry
No problem at all, was just a reminder :-) It simply makes post more structured and this in turn increases your chance of a good answer.