#!/bin/ksh
(($#!=3))&&{ echo Usage:$(basename $0) num1 num2 filename;exit 1; }
num=$(cat $3|wc -l)
n=1
while ((n<=$num))
do
case $n in
$1) cat $3|sed -n ${2}p ;;
$2) cat $3|sed -n ${1}p ;;
*) cat $3|sed -n ${n}p ;;
esac
((n+=1))
done
阅读(1297) | 评论(0) | 转发(0) |