20、Basic Shell_for_while_grep_find

转载:https://github.com/swcarpentry/DEPRECATED-boot-camps/blob/master/shell/shell_cheatsheet.md

1、For  loop

list[0]=Sam

list[1]=Lynne

list[2]=Dhavide

list[3]=Trevor

 for varname in ${list[@]}

do
    echo $varname
done

2、While Loop

COUNTER=0
while [ ${COUNTER} -lt 10 ]; do
    command 1
    command 2
    COUNTER=`expr ${COUNTER} + 1` 
done

3、grep

grep   -v -A1   -w  -Ff   gene_id    gene.fa

 

 

 

 
posted @ 2018-06-01 17:29  风中之铃  阅读(150)  评论(0编辑  收藏  举报