1 #! /bin/bash
2 read -p "enter:" p
3 echo "$p" >> ./1.tmp
4 until [ $p -eq 0 ]
5 do
6 read -p "enter:" p
7 echo "$p" >> ./1.tmp
8 c=`cat ./1.tmp |wc -l`
9 if [ $c -eq 20 ] ; then
10 sort -n ./1.tmp |tail -1
12 sort -n ./1.tmp |head -1
13 rm -rf ./1.tmp
14 exit
15 else
16 continue
17 fi
18 done
[root@vpn ~]# vi myfile
203
123
123
123
345
546
234
345
56534
3
34
[root@vpn ~]# cat myfile | sort -n | head -1
3
[root@vpn ~]# cat myfile | sort -n | tail -1
56534
使用VBS 或者JAVASCRIPT
这属于网页特效范围,你网上查下,我就不贴源码了。