提取指定日期的web日志shell
时间:2009-02-20 来源:bokhoo
#!/bin/bash
echo "输入一个日期和一个文件名:"
read date file
echo "显示结果还是显示详细数据1 and 2:"
read num
case $num in
1) echo "you selcet 1 只显示统计结果:"
cat $file|egrep -c "$date">result2.txt
;;
2) echo "you select 2 显示详细数据:"
cat $file|egrep "$date">result2.txt
;;
echo "输入一个日期和一个文件名:"
read date file
echo "显示结果还是显示详细数据1 and 2:"
read num
case $num in
1) echo "you selcet 1 只显示统计结果:"
cat $file|egrep -c "$date">result2.txt
;;
2) echo "you select 2 显示详细数据:"
cat $file|egrep "$date">result2.txt
;;
相关阅读 更多 +