至今写的最长的Linux管道命令
ll -rt ./_log/*.o* |awk '{if($5==84){print $9}}' | perl -ne '/(GP.*Chr.*\.sh)/;print "$1\n";' | while read a; do find . -name "$a" ;done | while read ss; do qsub -l vf=280M -cwd $ss;done
……
原因嘛,有些计算节点默认的SHELL不是bash,如果没shell-bang就出错到STDOUT:
Warning: no access to tty (Bad file descriptor). Thus no job control in this shell.
也有可能是其他原因,反正就这了……
后记,这样还是不行。也不知道计算节点的配置到底是出啥问题了。
后后记:结果嘛,# -S /bin/bash
Tags: bash, Galaxy_Original, Grid Engine, Note, shell
MoeFan (萌番)
ll |grep -v '\.'| awk '{print $9}'|xargs -n 1 ./cal.sh
grep '' *.len |sort|perl -alne 'print join("\t",split /\.len:/)' > all.alen
[回复]
[回复]
[回复]
find ./outI -name '*.soap'|while read a;do b=`basename $a`;c="$b\txx\t1\t100\t100\t222\t211\t233\t__FQ__\t$a";perl -e '$a=$ARGV[0];$a=~s/\\t/\t/g;$c=$ARGV[1];$c=~s#/2soap/#/1fqfilted/#;$c=~s/\.soap/\.fq/;$a=~s/__FQ__/$c/;print "$a\n"' $c $a;done
效率有些差,但,这类东东本来就不要求效率……
[回复]
[回复]
这个,嘛,两句拼的……
[回复]
[回复]
话说,下面这还算单行命令么……
getinfo.sh:
getinfo0.sh:
[回复]
Galaxy 回复:
六月 9th, 2010 at 1:15 下午 | 编辑
嘛,写一行Perl就可以说服自己容忍未优化的代码存在。
(这就是代码艺术家的矜持么……
[回复]