在while循環(huán)中讀取bash中的輸入我有一個(gè)bash腳本,如下所示,cat filename | while read linedo
read input;
echo $input;done但這顯然沒(méi)有給我正確的輸出,因?yàn)楫?dāng)我在while循環(huán)中讀取它時(shí),它試圖從文件文件名讀取,因?yàn)榭赡艿腎 / O重定向。還有其他方法嗎?
在while循環(huán)中讀取bash中的輸入
守著一只汪
2019-08-12 16:44:31