Macでコマンドを自作する
シェルを書く
$vim testhello
#!/bin/sh echo "HelloWorld!"
シェルの権限を変更する
$ chmod a+x testhello
$PATHを調べる
$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$PATHの一つへ作成したシェルをコピーする
$ cp testhello /usr/local/bin/ $ which testhello /usr/local/bin/testhello
コマンド完成!
$ testhello HelloWorld!