1 cat 1/project.json | sed 's/blocks/\n\nblocks/g' | grep flagclicked | sed 's/\(.\{24\}"opcode"\)/\n\n\1/g' | grep "procedures_call\|flagclicked" | sed 's/"parent.*//g' > 2
2 cat 2 -n > 4
3 cat 2 | wc -l | xargs -i seq {} > 3; cat 3 | xargs -i sed 's/^/{} /g' 3 | awk '{system( " sed -n "$1"p 4; sed -n "$2"p 4 " );}' | xargs -n 4 | grep "next:\(.*\), .*\1:" | awk '{print $1" "$3}' > 5
4 cat 5 | xargs -i sed 's/^/{} /g' 5 | awk '{if($2==$3) print $1" "$2" "$4}' > 6
5 cat 6 | xargs -i sed 's/^/{} /g' 6 | awk '{if($2==$4 && $3==$5) print $1" "$2" "$3" "$6}' > 7
6 cat 7 | xargs -i sed 's/^/{} /g' 7 | awk '{if($2==$5 && $3==$6 && $4==$7) print $1" "$2" "$3" "$4" "$8}'
今天的命令整理一下,发现,反复在用同一个策略:
cat someFile | xargs -i sed 's/^/{} /g' anotherFile
网友评论