カレントディレクトリの全てをディレクトリp
にまとめたかった。
これでは動かない
> find . -type d ! -name 'p' | grep './' | xargs -J % mv % p/
これで動く
> find . -type d ! -name 'p' | grep './' | xargs -J \% mv \% p/
fish shell では %
と{}
は特別扱いになるらしい
(参考)
Why does xargs under fish not accept {} as a replstr like it does with bash? ... | Hacker News