1

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.

2

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 &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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