Created
October 1, 2019 10:22
-
-
Save anekos/454038d08aaacf88151ccf34286c4ce8 to your computer and use it in GitHub Desktop.
シェルスクリプトでクロージャ(勿論動かない)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function upload () { | |
local src="$1" | |
# ... | |
mv "$temp" "$src" | |
clean_src () { | |
rm "$src" | |
} | |
trap clean_src EXIT | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
まだ暑いんですよ…