http://blog.chinaunix.net/u/13329/showart.php?id=166401
$cat rename.sh#!/bin/sh
#
#Author: cnscn
#Date : 2006-09-07
#Home : http://cnscn2008.cublog.cn
#
#read lines from file
function read_line_file
{
FILENAME=$1
while read LINE
do
echo ${LINE}
...
done < $FILENAME
}
#call function
read_line_file $1
#End of script.$ cat a.txt | more11563629962
11563634472
11561796722
11559395371
11564486721
11561724591
11559191541
11561739722
11559288902
11542068311
11558335531
11558479671
11558278691
11560002781
$rename.sh a.txt11563629962
11563634472
11561796722
11559395371
11564486721
11561724591
11559191541
11561739722
11559288902
11542068311
11558335531
11558479671
11558278691
11560002781
阅读(2264) | 评论(0) | 转发(0) |