repo.or.cz
/
arrow.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
up, add new config files and delete old tar conf file
[arrow.git]
/
conf_slk120
/
bin
/
.bin
/
shell
/
sed_num
blob
a140db8bf977ccf431ee79380e7b14ff56f1b31f
1
#/bin/bash
2
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
10
fi
11
12
theline=`grep ${keyword} ${file} -n | head -n1 | cut -d : -f 1`
13
#echo $theline
14
sed -i "${theline}s/${keyword}/${replace}/;" ${file}
15