18 lines
175 B
Bash
Executable File
18 lines
175 B
Bash
Executable File
#/bin/sh
|
|
|
|
# $1 program
|
|
# $2 file
|
|
|
|
set -ex
|
|
|
|
prog="$1"
|
|
file="$2"
|
|
|
|
name=${file%.*}
|
|
ext=${file##*.}
|
|
|
|
ln -f "$file" "$name.tmp.$ext"
|
|
|
|
$prog "$name.tmp.$ext"
|
|
rm -f "$name.tmp.$ext"
|