美文网首页
【Shell】数字补零与for循环

【Shell】数字补零与for循环

作者: Silver_42ac | 来源:发表于2019-09-25 19:44 被阅读0次

不想磨洋工;还是加快点速度吧

#for((i=1;$i<=10;$i++));do
for x in {1..15};do
num=`echo $x | awk '{printf("%02d",$0)}'`;
#num= `printf "%02d" $x`;
echo ${num};
python  change_gff_pos2chrom_v2.py  contig.bed.stat ${num}.contig.gff ${num}.gff
python sort_gff.py ${num}.gff ${num}.sorted.gff
done 

参考:
解决shell脚本for i in {0..10}输出{0..10}的问题
shell如何实现 数字 字符串自动补零 awk

相关文章

网友评论

      本文标题:【Shell】数字补零与for循环

      本文链接:https://www.haomeiwen.com/subject/xgrkuctx.html