linux文本文件怎么一键加#? root@ubuntu:~# cat a 0 2 0 root@ubuntu:~# cat 1.sh line=$1 n_num=`sed -n "${line}p" a` num=`expr $n_num + 1` sed -i "${line}s/.*/$num/g" a cat a root@ubuntu:~# sh 1.sh 2 0 3 0 root@ubuntu:~# sh 1.sh 3 0 3 1 Published by 风君子 独自遨游何稽首 揭天掀地慰生平 View all posts by 风君子