Is there a way to delete lines starting with certain strings.
I have this youtube-dl code
youtube-dl --extract-audio --audio-quality 0 --newline --audio-format mp3 https://www.youtube.com/playlist?list=PL1C815DB73EC2678E
and its result is like this
[youtube:playlist] PL1C815DB73EC2678E: Downloading webpage
[download] Downloading playlist: Less than 1 minute
[youtube:playlist] playlist Less than 1 minute: Collected 4 video ids (downloading 4 of them)
[download] Downloading video 1 of 4
[youtube] KNLwsqzFfNg: Downloading webpage
[youtube] KNLwsqzFfNg: Extracting video information
[youtube] KNLwsqzFfNg: Downloading DASH manifest
[download] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a
[download] 0.4% of 231.51KiB at 6.10KiB/s ETA 00:30
[download] 1.1% of 231.51KiB at 27.07KiB/s ETA 00:10
[download] 4.0% of 231.51KiB at 19.24KiB/s ETA 00:04
[download] 6.5% of 231.51KiB at 75.06KiB/s ETA 00:03
[download] 13.4% of 231.51KiB at 98.22KiB/s ETA 00:03
[download] 28.7% of 231.51KiB at 81.40KiB/s ETA 00:02
[download] 61.7% of 231.51KiB at 91.56KiB/s ETA 00:01
[download] 86.2% of 231.51KiB at 82.96KiB/s ETA 00:00
[download] 100.0% of 231.51KiB at 73.21KiB/s ETA 00:00
[download] 100% of 231.51KiB in 00:02
[ffmpeg] Correcting container in "_1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a"
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
[avconv] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.mp3
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
Deleting original file _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a (pass -k to keep)
[download] Downloading video 2 of 4
[youtube] wTvXkMpJflk: Downloading webpage
[youtube] wTvXkMpJflk: Extracting video information
[youtube] wTvXkMpJflk: Downloading DASH manifest
I want to delete all lines starting with [youtube]
, [ffmpeg]
and [avconv]
and get like this
[youtube:playlist] PL1C815DB73EC2678E: Downloading webpage
[download] Downloading playlist: Less than 1 minute
[youtube:playlist] playlist Less than 1 minute: Collected 4 video ids (downloading 4 of them)
[download] Downloading video 1 of 4
[download] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a
[download] 0.4% of 231.51KiB at 6.10KiB/s ETA 00:30
[download] 1.1% of 231.51KiB at 27.07KiB/s ETA 00:10
[download] 4.0% of 231.51KiB at 19.24KiB/s ETA 00:04
[download] 6.5% of 231.51KiB at 75.06KiB/s ETA 00:03
[download] 13.4% of 231.51KiB at 98.22KiB/s ETA 00:03
[download] 28.7% of 231.51KiB at 81.40KiB/s ETA 00:02
[download] 61.7% of 231.51KiB at 91.56KiB/s ETA 00:01
[download] 86.2% of 231.51KiB at 82.96KiB/s ETA 00:00
[download] 100.0% of 231.51KiB at 73.21KiB/s ETA 00:00
[download] 100% of 231.51KiB in 00:02
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
Deleting original file _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a (pass -k to keep)
[download] Downloading video 2 of 4
etc..
etc..
.
.
i tried this method but its showing error and it only suppose to delete [youtube]
youtube-dl --extract-audio --audio-quality 0 --newline --audio-format mp3 https://www.youtube.com/playlist?list=PL1C815DB73EC2678E | sed '^/[youtube]/ d'
sed '/^\[youtube\]/d'
.