I just saw the list of commands below on a web page - they install a static version of ffmpeg in the user's ~/bin directory. The commands are not part of a script, the user is supposed to copy and paste the commands into the shell. I didn't need or use the commands but...My question concerns the first command: mkdir -p ~/bin && bashWhat is the purpose of using bash in the command? Of course I know what && does and presumably bash just starts a new instance of bash but why would it be necessary to start a new instance of bash? Or does bash, when used like this, have some other purpose?mkdir -p ~/bin && bashwget -qO ~/ffmpeg.tar.gz http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xztar xf ~/ffmpeg.tar.gz && cd && rm -rf ffmpeg-*-64bit-static/{manpages,presets,readme.txt}cp ~/ffmpeg-*-64bit-static/* ~/binchmod 700 ~/bin/{ffmpeg,ffprobe,ffmpeg-10bit,qt-faststart}cd && rm -rf ffmpeg{.tar.gz,-*-64bit-static}
Purpose of '&& bash' in a command (not the '&&' part, the 'bash' part)
bash
Some programs require you to be signed in with the bash shell to work correctly, this might be the reason why && bash is used.The && operator succeeds in executing the second command only if the previous command had worked correctly- but you knew that already, so my guess is the the software youre trying to install requires a bash shell and other shells might not work properly with the given program. Hope this helped.