代码如下: #!/bin/sh strace -q -eread cp — “${1}” “${2}” 2>&1 \ | awk ‘{ count += $NF if (count == 0) { percent = count / total_size * 100 for (i=0;i<=percent;i++) printf(“=”); printf(“>”); printf (“%2.0f%%\r”, percent); } } END { print “” }’ t