简体   繁体   English

Bash:依次打开目录中的多个文件

[英]Bash: Open multiple files in directory sequentially

I have 10 images that need to be opened using a specific program called abc (used as "abc "). 我有10张图片需要使用称为abc(用作“ abc”)的特定程序打开。 But I want to open these in the program one by one and run through all of them by simply pressing Enter for example. 但是我想在程序中一个一个地打开它们,然后只需按Enter键就可以遍历所有这些。 So this would allow me to find the image I'm looking for relatively quickly. 因此,这将使我能够相对快速地找到所需的图像。

I'm using: 我正在使用:

for file in ./*; do echo $file; ~/Scripts/abc $file; done

It opens the first file, and when I press Enter it doesn't return anything. 它打开第一个文件,当我按Enter时,它不返回任何内容。

I'm completely new to bash and would really appreciate any tips. 我是bash的新手,非常感谢任何提示。 Thanks! 谢谢!

for file in ./*; do echo $file; ~/Scripts/abc $file &; read; done

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM