LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2016, 02:15 PM   #1
bash_noob
LQ Newbie
 
Registered: Feb 2016
Posts: 1

Rep: Reputation: Disabled
Exclamation bash script using aria2 not working


I found a bash script with wget here :
Code:
 http://www.linuxquestions.org/questions/showthread.php?p=5470985
I want to use aria2. its giving bad variable name. the script is:
Code:
 echo "Name"
read name
echo start no.
read incr
while read i 
  do 
    aria2c "$i" -x 16 -o $name_ep$incr
    incr=$((incr+1))
done < $name
Can anyone help me?
 
Old 02-09-2016, 02:52 PM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,006

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
You have no variable called "$name_ep". Assuming that should be the "name" variable, you will need to enclose in braces: "${name}_ep"

You should also get in the habit of quoting all variables unless you are 100 sure you do not need to.
 
Old 02-10-2016, 12:17 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
is that the whole script?
what is it supposed to do, what are you trying to achieve?
 
  


Reply



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 not working Widgeteye Programming 10 12-27-2015 11:32 AM
[SOLVED] why is my delete bash script not working? BrinkofMadness Linux - Newbie 5 12-05-2010 09:43 AM
Help! Bash script not working cynthiatan General 2 11-10-2008 01:45 AM
bash script not working :'( aesahaettr Linux - Software 5 05-12-2004 01:08 AM
Bash script not working AMMullan Linux - General 2 09-28-2003 07:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:45 AM.

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