Skip to content

Instantly share code, notes, and snippets.

@nishinoshake
Last active May 29, 2016 05:12
Show Gist options
  • Save nishinoshake/8f46cc08682474d670d5 to your computer and use it in GitHub Desktop.
Save nishinoshake/8f46cc08682474d670d5 to your computer and use it in GitHub Desktop.
シェルスクリプトの書き方
#!/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