diff options
| author | Horus3 | 2014-12-01 22:12:50 +0100 |
|---|---|---|
| committer | Horus3 | 2014-12-01 22:12:50 +0100 |
| commit | 5238c8e35b7f84cbada81214151f61921d41a8ba (patch) | |
| tree | d83695a8b93500b78ae5e8d8489bc314a7392819 /bin | |
| parent | 21e75ab969099baf43ccb275fa8b7307f1389c62 (diff) | |
| download | dotfiles-5238c8e35b7f84cbada81214151f61921d41a8ba.tar.gz | |
Fixed time stamp.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/quer.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/quer.py b/bin/quer.py index 3e37276..5fe0dd0 100755 --- a/bin/quer.py +++ b/bin/quer.py @@ -3,10 +3,18 @@ # echo "Das ist ein String" | ./query.py import fileinput +import sys quer = 0 +args = sys.argv -for line in fileinput.input(): +if len(args) == 0: + inputs = sys.argv +else: + inputs = fileinput.input() + +#for line in fileinput.input(): +for line in inputs: l = list(line) for char in l: quer = quer+ord(char) |
