Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env MathKernel
- x = 2+2;
- Print[x];
- Print["There were ", Length[ARGV], " args passed in on the command line."];
- linesFromStdin = readList[];
- etc.
- #!/bin/sh
- exec <"$0" || exit; read; read; exec /usr/local/bin/math -noprompt "$@" | sed '/^$/d'; exit
- (* Mathematica code starts here *)
- x = 2+2;
- Print[x];
- export PATH=$PATH:/Applications/Mathematica.app/Contents/MacOS
- #!/usr/bin/env MathKernel -script
- $ cat hello.ma
- #!/usr/bin/env MathKernel -script
- Print["Hello World!"]
- $ chmod a+x hello.ma
- $ ./hello.ma
- "Hello World!"
Add Comment
Please, Sign In to add comment