1
0
Fork 0
mirror of https://github.com/engineer-man/piston.git synced 2025-05-11 14:16:27 +02:00
piston/packages/MATL/22.7.4/run
2023-05-24 18:20:30 +02:00

13 lines
No EOL
275 B
Bash

#!/usr/bin/env bash
# get file as first argument
file="$1"
# remove the file from $@
shift
# use the rest of the arguments as stdin
stdin=`printf "%s\n" "$@"`
# pass stdin into octave which will run MATL
echo "$stdin" | octave -W -p "$MATL_PATH" --eval "matl -of '$file'"