I want to find out if a file has been modified since the last time my shell script was started, maybe by creating a boolean or something...
Maybe it would be possible to save th
kev's solution in Python, works if you have permissions to touch the script:
#!/usr/bin/python
import os
import sys
files= ('a.txt', 'b.txt')
me= sys.argv[0]
mytime= os.path.getmtime(me)
for f in files:
ft= os.path.getmtime(f)
if ft > mytime:
print f, "changed"
os.utime(me, None)