diff --git a/TODO.norg b/TODO.norg index bdf1679..43a5cf7 100644 --- a/TODO.norg +++ b/TODO.norg @@ -13,6 +13,7 @@ This is a list of tasks that would be cool to add. - (x) Install script to system Using update-alternatives is the most handy - (x) Accept input from stdin when no file is given + - ( ) Process only first N or last N Bytes - ( ) Write a complete task for this stuff *** Networking - ( ) Mini curl diff --git a/src/hexdumper.py b/src/hexdumper.py index de02371..b7ae40e 100755 --- a/src/hexdumper.py +++ b/src/hexdumper.py @@ -80,6 +80,7 @@ def main(): try: file.seek(0, os.SEEK_END) flen = file.tell() + file.seek(0, os.SEEK_SET) except io.UnsupportedOperation: # some kinds of "files" like stdin are not seekable flen = 0