shell脚本,一个字符一个字符输出。
[root@localhost wyb]# cat file 123 abc 456 456 def 1 23 5678 abc 789 789de f567 [root@localhost wyb]# cat fffile.sh #!/bin/bash cat file| while read line do for i in `seq 1 ${#line}` do a=`echo $line|cut -c $i` echo -ne "$a" sleep 0.1 done echo " " done [root@localhost wyb]# bash fffile.sh 123 abc 456 456 def 1 23 5678 abc 789 789de f567 [root@localhost wyb]#