title: How to catch output of bash script and import it to another?
body: <p>On my Arch Linux PC, I've downloaded the package <code>youtube-dl</code> from the official repositories. When I use it to download YouTube videos in mp4 format, the result looks like this (I'll be using '$' to indicate the shell prompt): </p>
  
  <pre><code>`$ youtube-dl --format mp4 https://www.examplelink.com`
  
  [youtube] Q0CbN8sfihY: Downloading webpage
  [youtube] Q0CbN8sfihY: Downloading video info webpage
  [youtube] Q0CbN8sfihY: Extracting video information
  [youtube] Q0CbN8sfihY: Downloading MPD manifest
  [download] Destination: ExampleVideo.mp4
  [download] 100% of 15.07MiB in 00:20`
  </code></pre>
  
  <p>I'm hoping to catch the video title from this output, and import it into another script, which looks like this:</p>
  
  <pre><code>`#! /bin/bash`
  
  `track=`echo "$@"`
  music='/home/samuel/Music/'
  video='/home/samuel/Videos/'
  ffmpeg -i "$video$track".mp4 -acodec libmp3lame -ab 160k -ar 44100 -ac 2 "$music$track".mp3`
  </code></pre>
  
  <p>This will convert the <code>.mp4</code> file to <code>.mp3</code> format, and in turn, create a completely automated process. How would you catch the name of the video title and import it into the other script?</p>