running actual unix commands

Andrew Thomson ajthomson at optushome.com.au
Wed May 28 01:37:06 EDT 2003


not sure if this is the best way, but i'm attempting the following:

cmd = "find " + dir + " " + "-type f -name \"*.ajt\" -amin +" + time + "
" + "| wc -l | awk \'{print $1}\'"
files = os.system(cmd)
print files

however as some might predict, the output of this program isn't what I
expect..

./test2.py
3
0

thoughts appreciated.

ajt.









More information about the Python-list mailing list