Skip to content

Instantly share code, notes, and snippets.

@i-kumagai
Created June 24, 2014 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save i-kumagai/e874c9ae60c97a612b90 to your computer and use it in GitHub Desktop.
Save i-kumagai/e874c9ae60c97a612b90 to your computer and use it in GitHub Desktop.
check_offset.py
import sys
argvs = sys.argv
tgt=argvs[1]
char=argvs[2]
f=open(tgt,'r')
try:
data=f.read()
print data.index(char)
finally:
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment