up, add new config files and delete old tar conf file
[arrow.git] / conf_slk120 / bin / .bin / shell / sed_num
bloba140db8bf977ccf431ee79380e7b14ff56f1b31f
1 #/bin/bash
3 keyword=$1
4 replace=$2
5 file=$3
6 #num=$4
7 if [ "$file" = "" ]; then
8         echo "usage: command <keyword> <replaceto> <filename>"
9         exit 1
12 theline=`grep ${keyword} ${file} -n | head -n1 | cut -d : -f 1`
13 #echo $theline
14 sed -i "${theline}s/${keyword}/${replace}/;" ${file}