LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-21-2015, 08:33 AM   #1
shams
Member
 
Registered: Jan 2004
Posts: 537

Rep: Reputation: 30
Question bash script error?


This is a bash script running in loop reading the videos urls from the file urls and downloading with youtube-dl and then removing the downloaded video url from the file and starting to download the next video, when i run this code get this error:
Quote:
$ ./ydown.sh
./ydown.sh: line 4: /usr/bin/youtube-dl -c -v: No such file or directory
./ydown.sh: line 4: /usr/bin/youtube-dl -c -v: No such file or directory
Thsi is the ydown.sh:
Code:
#!/bin/bash
while read line
do
"/usr/bin/youtube-dl -c -v" $line
sed -i "\#$line#d" urls
done < urls
youtube-dl is installed in the /usr/bin:
Quote:
$ whereis youtube-dl
youtube-dl: /usr/bin/youtube-dl /usr/share/man/man1/youtube-dl.1.gz

Last edited by shams; 03-21-2015 at 08:37 AM.
 
Old 03-21-2015, 12:14 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Just remove the quotes and it should work fine:

Code:
#!/bin/bash
while read line
do
/usr/bin/youtube-dl -c -v $line
sed -i "\#$line#d" urls
done < urls1
 
Old 03-22-2015, 09:04 PM   #3
shams
Member
 
Registered: Jan 2004
Posts: 537

Original Poster
Rep: Reputation: 30
Thanks for reply that works.
 
Old 03-23-2015, 12:07 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Good to hear that please mark the thread as solved!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script error tuts73 Linux - Newbie 2 04-14-2012 12:31 PM
Bash Script Error nathacof Programming 2 01-20-2009 06:37 PM
bash script read error and awk ouptut error whited Programming 4 10-16-2007 07:05 PM
bash script error noir911 Programming 5 09-12-2006 06:42 AM
error when tying to run python script(bash error?) shanenin Programming 5 01-10-2006 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration