Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のようなコマンドから返されたファイルに対して関数を実行したい:
less {ls ./my dir | tail -1}
しかし、私は何か間違ったことをしていますが、それゆえに指を置くことができません:
invalid suffix character in obsolescent option
xargsを使用します:
ls ./my dir | tail -1 | xargs less
間違った区切り文字のセットを使用しています:
less "$( ls ./mydir | tail -1)"