1

I was running a for loop in terminal which has a sox command in it. For some reason the sox command failed and now I cannot terminate the for loop. I tried pressing Ctrl+c many times, Ctrl+z many times but no use.

I can't get the prompt, terminal just stays like that. There is no sox process running in the background as per ps aux How to deal with this case, I don't want to close the tab but fix the problem by some other means.

$ for spkr in /home/user/tmp/*; do  filesIn1Line=`tr '\n' ' ' < $spkr`; sox $filesIn1Line en_$spkr.wav; echo $spkr; done

sox FAIL formats: can't open output file `en_/home/user/file1.wav': No such file or directory
^C^C^C^C^Z^Z^Z^Z^Z^Z^Z^C^C^C^C^C^C^C
^C^C^C^C^C^Z^Z^X^X^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^
3
  • Try C-\ to send a SIGQUIT. This often works when C-c doesn't, for various reasons. If that doesn't work, you could find the bash process and kill it manually, if you wanted.
    – Tom Hunt
    Commented Oct 5, 2015 at 16:03
  • @TomHunt thanks, tried that didn't work. How do I find the bash process for a for loop?
    – user13107
    Commented Oct 6, 2015 at 5:21
  • Killing the bash process would cause the terminal to exit, which was what you did not want to do.
    – Kusalananda
    Commented Oct 3, 2017 at 11:59

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.