Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to run this u2be2mp3(){ youtube2mp3 "$@" > /dev/null;} in background? It's part of the .bashrc, and if I use it this way: "u2be2mp3(){ youtube2mp3 "$@" > /dev/null &;}" I'll get a syntax error.

share|improve this question
up vote 1 down vote accepted

It should work if you use the & instead of the ;, not both at the same time:

u2be2mp3() { youtube2mp3 "$@" > /dev/null & }

Also, to be exact, that's a shell function, not an alias, and the above line runs the youtube2mp3 command in the background, not the function. You could also keep your original shell function and run the shell function in the background:

u2be2mp3() { youtube2mp3 "$@" > /dev/null; }

And to start it in the background:

u2be2mp3 &
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.