Last active
May 29, 2016 05:12
-
-
Save nishinoshake/8f46cc08682474d670d5 to your computer and use it in GitHub Desktop.
シェルスクリプトの書き方
This file contains hidden or 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
| #!/bin/sh | |
| # 1行目は実行するシェルを指定する。シバン、シェバン行という。 | |
| # 変数の代入はそのまま | |
| string="Hello" | |
| # 変数の表示は$をつけて | |
| echo $string | |
| # 引数は$0 スクリプト名 $1-$9 引数 $# 引数の数など | |
| echo $1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment