Script implements pv command
#! / bin/bash
For i in $* # script passes parameters
Do
Echo-n $I
The sequence of for j in `seq 4` # needs to be quoted in reverse quotation marks to achieve the effect.
Do
Sleep 0.3
The nei content after echo-n "." # echo needs quotation marks to avoid abnormal results.
Done
Done
Echo
[root@zhouyaxiong scripts] # sh pv.sh i love you
I....love....you....
[root@zhouyaxiong scripts] # time sh pv.sh i love you
I....love....you....
Real0m3.661s each word will be displayed at an interval of 1.2 seconds.
User0m0.005s
Sys0m0.016s