Created
April 30, 2014 12:47
-
-
Save tkuchiki/edb7094509b77d9000e4 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
# 実行ユーザのホームディレクトリ | |
ls ~ | |
# 指定したユーザのホームディレクトリ | |
ls ~user | |
# 指定したユーザのホームディレクトリ(失敗) | |
USERNAME=USER ls ~$USERNAME | |
# 指定したユーザのホームディレクトリ(変数使用) | |
USERNAME=USER ls $(sh -c "echo ~$USERNAME") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment