如何忽略pipe傳進來的資料 - Linux

By John
at 2011-01-11T14:39
at 2011-01-11T14:39
Table of Contents
我不知道怎麼在標題裡精確說明我的問題@@
其實我的情況是這樣
例:
while read i;do read j;do < list.txt
list.txt裡有一行一行的檔名
我要怎麼樣指定
這些檔名是要餵給read i
叫read j不要去拿XDDD
或是說我要怎麼樣在read j之前
先把file descripter轉回正常的stdin
之後再轉回來
我實際遇到的問題是
while read i; do mplayer "$i";done < list.txt
它讀完第一個檔名後
似乎會把第二個檔送進mplayer
然後mplayer就crash了XD
謝謝!
--
Tags:
Linux
All Comments

By Skylar Davis
at 2011-01-13T23:41
at 2011-01-13T23:41

By Andrew
at 2011-01-15T05:48
at 2011-01-15T05:48

By Hazel
at 2011-01-19T16:50
at 2011-01-19T16:50

By Eartha
at 2011-01-23T16:24
at 2011-01-23T16:24

By Joe
at 2011-01-28T03:38
at 2011-01-28T03:38

By Yedda
at 2011-02-01T19:18
at 2011-02-01T19:18

By Skylar Davis
at 2011-02-06T15:14
at 2011-02-06T15:14

By Mason
at 2011-02-07T16:38
at 2011-02-07T16:38

By Kumar
at 2011-02-08T20:55
at 2011-02-08T20:55
Related Posts
CentOS 讓使用者只有登出的權限

By Quintina
at 2011-01-10T20:18
at 2011-01-10T20:18
opensuse發出怪聲…

By Candice
at 2011-01-10T18:28
at 2011-01-10T18:28
/sbin/init相關檔案被覆蓋想回覆的解法

By Suhail Hany
at 2011-01-10T17:31
at 2011-01-10T17:31
NB灌Win7 + Ubuntu 10.10

By Hardy
at 2011-01-10T17:15
at 2011-01-10T17:15
Ubuntu→該下載那個檔案?

By Jacky
at 2011-01-10T16:32
at 2011-01-10T16:32