LoginSignup
1
1

More than 5 years have passed since last update.

bashのプロセス置換

Posted at

bashのプロセス置換を使ってみてるけど仕組みを理解してないのでよくわからん

これは動いた

bash-3.2$ cat <(ls)

これも動いた

bash-3.2$ f(){ p=<(ls); cat $p; }; f

これはだめ

bash-3.2$ p=<(ls); cat $p
cat: /dev/fd/63: Bad file descriptor

変数に代入とか,やらないほうがいいのか

試した環境

  • Mountain Lionのbash(3.2.48)
1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1