When I run an mp3 command by doing mpg123 Thunder.mp3, it runs in a loop. Is there any way to fake a Control-C keyboard interrupt via bash script?
Asked
Active
Viewed 627 times
2
Aurora0001
- 6,308
- 3
- 23
- 38
ToXicL 16
- 19
- 1
- 8
1 Answers
3
(I use mpg123 as example program)
As the comment say, you need
$ pkill mpg123
Alternative:
$ killall mpg123
Also, you'd better check if the process is indeed running:
$ pgrep -f mpg123
Reference:
ice1000
- 131
- 6
pkill mpg123– RubberStamp Dec 09 '17 at 00:11