Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1000  / 3 Years ago, mon, may 3, 2021, 9:47:47

I have certain PDF files. I want to inspect each of them for 20 seconds. The way I was trying to do that is like following: for file in *.pdf; do echo $file; evince $file; sleep 20s; killall evince; done . It displays the first file, but does not kill it after 20s. What is going wrong here?


More From » scripts

 Answers
4

I think you just forgot to run evince in background:



for file in *.pdf; do echo $file; evince $file &; sleep 20s; killall evince; done


Notice the & after the evince command.


[#28549] Tuesday, May 4, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ndaavi

Total Points: 169
Total Questions: 116
Total Answers: 113

Location: Falkland Islands
Member since Wed, Dec 23, 2020
3 Years ago
;