mirror of
https://github.com/dani-garcia/bw_web_builds.git
synced 2024-12-27 21:08:16 +03:00
21 lines
249 B
Bash
21 lines
249 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [ ! -f $1 ]
|
||
|
then
|
||
|
echo "$1 does not exist"
|
||
|
exit -1
|
||
|
fi
|
||
|
|
||
|
if [ ! -f $2 ]
|
||
|
then
|
||
|
echo "$2 does not exist"
|
||
|
exit -1
|
||
|
fi
|
||
|
|
||
|
echo "'$1' -> '$2'"
|
||
|
|
||
|
first='`$'
|
||
|
last='^`'
|
||
|
sed -i "/$first/,/$last/{ /$first/{p; r $1
|
||
|
}; /$last/p; d }" $2
|