There are number of ways, using wget with option -O (as in OK) like this should be the easiest:
Code:
var=$(wget -O - http://domain.com/var.txt)
the O option is to output result to stdout instead of a file.
[ More wget examples can be found @
http://www.editcorp.com/Personal/Lar...v1/wget_7.html ]
Or you can use a python script like this to do the job:
Code:
#!/usr/bin/env python
import os
from urllib import urlopen
raw_text=urlopen('http://domain.com/var.txt').read()
var=raw_text.strip() # in case there's ending \n
if var=='1':
f=os.popen('/root/dostuff.sh')
# the stdout can then be obtained through f.readline(), if needed