I am writing a script in bash to easily loop some software, and depending on the inputs select a different strategy to use for a particular run. For example whether or not to run on all the files in a directory or just a subset, and whether files are paired or independent. (I'm working with fastq files if you an tell)
Usually I prefer to write case control statement whenever I have 3 or more options because I find it is easier to interpret and maintain. However I want to be able to test if certain files exist similar to when if/else statements in bash do if [ -e $foo ]; then etc That got me wondering if case control statements have any equivalent test options to if/else statements example
More specifically I want to know if its possible to test for the existence of a file with a case statement
Aucun commentaire:
Enregistrer un commentaire