just read you want to replace occ/bfactor, so add one pipe more:
grep '^ATOM' $pdb | shuf |tail -n`echo "($percent * $N)/1"|bc` |awk '{val=substr($0,57,10);gsub(val,"0.00 0.00",$0)}1'
Dnia 2016-07-07, o godz. 20:06:54
Michal Jamroz <[log in to unmask]> napisaĆ(a):
> the same with bash oneliner:
>
> pdb='2pcy.pdb; percent=0.1; N=`grep -c '^ATOM' $pdb`; grep '^ATOM'
> $pdb| shuf |tail -n`echo "($percent * $N)/1"|bc`
|