This file is indexed.

/usr/share/sagemath/bin/sage-run is in sagemath-common 8.1-7ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python

import os, sys
from subprocess import call

if len(sys.argv) < 2:
    print("You must give a file argument")
    sys.exit(1)

fn = sys.argv[1]
opts = sys.argv[2:]

if fn.startswith('-'):
    print("sage-run received unknown option: {}".format(fn))
    print("usage: sage [options]")
    print("Try 'sage -h' for more information.")
    sys.exit(1)


if fn.endswith('.sage'):
    if call(['sage-preparse', fn]) != 0:
        sys.exit(1)
    os.execvp('sage-python', ['sage-python', fn + '.py'] + opts)
elif fn.endswith('.pyx') or fn.endswith('.spyx'):
    os.execvp('sage-run-cython', ['sage-run-cython', fn] + opts)
else:
    os.execvp('sage-python', ['sage-python', fn] + opts)