タッチ機能[オフ]

タッチ機能[オフ]

次はなぜ機能しないのですか?

function xyz(){ touch $1; }
xyz temp1.txt

エラーが発生しました。

touch: missing file operand
Try `touch --help' for more information.

ベストアンサー1

コピーできません:

$ function xyz() { touch "$1"; }
$ xyz temp1.txt
$ ls temp1.txt
temp1.txt

おすすめ記事