File: sub

package info (click to toggle)
bart 0.9.00-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,040 kB
  • sloc: ansic: 116,116; python: 1,329; sh: 726; makefile: 639; javascript: 589; cpp: 106
file content (22 lines) | stat: -rwxr-xr-x 414 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
set -e

if [ ! -f ${BART_TOOLBOX_PATH}/bart ] ; then

	if [ -f ${TOOLBOX_PATH}/bart ] ; then
		BART_TOOLBOX_PATH=${TOOLBOX_PATH}
	else
		echo "\$BART_TOOLBOX_PATH is not set correctly!"
		exit 1
	fi
fi

if [ $# -lt 3 ] ; then

	echo "Usage: $0 <input1> <input2> <output>" >&2
	echo "Subtract <input1> from <input2> and save in <output>" >&2
	exit 1
fi

${BART_TOOLBOX_PATH}/bart saxpy -- -1. $1 $2 $3