/usr/bin/slicecat is in python-ceres 0.10.0~git20150525-1.
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 28 29 30 31 | #!/usr/bin/python
import sys
import os
import time
import struct
from optparse import OptionParser
parser = OptionParser(usage='%prog [options] <path>')
options, args = parser.parse_args()
if not args:
parser.print_usage()
sys.exit(1)
path = args[0]
filename = os.path.basename(path)
timestamp, timeStep = filename[:-6].split('@', 1)
timestamp, timeStep = int(timestamp), int(timeStep)
packedValues = open(path, 'rb').read()
format = '!' + ('d' * (len(packedValues) / 8))
values = struct.unpack(format, packedValues)
for value in values:
print "[%d]\t%s\t%s" % (timestamp, time.ctime(timestamp), value)
timestamp += timeStep
|