Results 1 to 5 of 5

Thread: bash troubl using &

  1. #1
    Join Date
    Aug 2011
    Location
    usa
    Posts
    232

    Default bash troubl using &

    Hi, I wanted to play an audio file so I ran the command:

    Code:
    play -q file.ext &
    It started running the command but no audio came out of my speakers, so I ran top and ps and discovered that the play process was stopped. I tried using coproc but to no avail.

  2. #2

    Default Re: bash troubl using &

    Try redirecting STDOUT and STDERR away before the '&':

    Code:
    play -q file.ext >/dev/null 2>&1 &
    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  3. #3
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,002

    Default Re: bash troubl using &

    It should work fine that way - are you sure you can play the file without forking to the background? If it's an mp3 you'll need the Packman's SoX version.

    What format is it?
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  4. #4
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,582

    Default Re: bash troubl using &

    If it is a propritary format then you will need to add the codecs for it from packman

    detailed instructions here

    https://forums.opensuse.org/showthre...a-in-One-Click

  5. #5
    Join Date
    Aug 2011
    Location
    usa
    Posts
    232

    Default Re: bash troubl using &

    Code:
    % play "All Night Long.flac" > /dev/null 2>&1 &
    [1] 21100
    % ps
      PID TTY          TIME CMD
    20803 pts/3    00:00:00 bash
    21100 pts/3    00:00:00 play
    21105 pts/3    00:00:00 ps
    
    [1]+  Stopped                 play "All Night Long.flac" > /dev/null 2>&1
    %
    ???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •