Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Perl script countdown

$
0
0
In the below bash when the perl is it possible to hide the commands from running on screen and display a process countdown?

For example, on the cygwin screen now the user sees each process in the command running as running protocol refGene, running protocol popfreq_all, etc... Could a display with a countdown be used instead or maybe an hour glass displays until the entire process completes? Thank you :).

Code:

annovar() {
    # combine id and position files
        cd 'C:\Users\cmccabe\Desktop\annovar'
        cp out_parse.txt "$(cat target.txt)"
       
        # run annotation
              $( perl -ne 'chomp; system ("perl table_annovar.pl $_ humandb/ -buildver hg19 -protocol refGene,popfreq_all,common,clinvar,clinvarsubmit,clinvarreference -operation g,f,f,f,f,f ")' < target.txt )
                         
    printf "The annotation is complete, would you like analyze additional target gene patients? Y/N "; read match_choice
        case "$match_choice" in
        [yY]) id="${id}"; menu ;;
        [nN]) id="${id}"; remove ;;
                esac
}

Maybe:
Code:


countdown=operation # there are (6) after the -operation
while [[ ${countdown} -ge 0 ]]
do
        echo ${countdown}
        sleep 1
        countdown=$(( ${countdown} - 1 ))
done
Time until Completion = "${countdown}"


Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images