Skip to content

Instantly share code, notes, and snippets.

View jhanschoo's full-sized avatar
👋

Johannes Choo jhanschoo

👋
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jhanschoo on github.
  • I am jhanschoo (https://keybase.io/jhanschoo) on keybase.
  • I have a public key whose fingerprint is 6217 6952 2B39 0F3E 233A 83B5 368D D385 ADA2 A8E4

To claim this, I am signing this object:

def f(): # returns "bar"
try:
a = "foo"
return a
finally:
a = "bar"
return a
# order of evaluation:
# 3:a = "foo"
# 4:return a -eval-> return "foo"
#!/bin/bash
for FILENAME in "$@"
do
export FILENAME
NEWNAME="$(exiv2 $FILENAME | grep "Image timestamp" | cut -d ' ' -f 4,5 | sed 's/\(.*\) \(.*\)/\1T\2.jpg/')"
# don't forget to quote
if [ "$NEWNAME" != "" ] # equivalent to [ -n "$NEWNAME" ]
then