Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1001  / 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
ndaavi questions
Tue, Apr 18, 23, 02:18, 1 Year ago
Wed, Jul 7, 21, 21:29, 3 Years ago
Wed, Jun 8, 22, 20:15, 2 Years ago
Tue, Aug 23, 22, 11:51, 2 Years ago
;