LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-20-2012, 02:54 PM   #1
spaghettios
LQ Newbie
 
Registered: Jul 2012
Location: UK
Distribution: Ubuntu, Slackware
Posts: 28

Rep: Reputation: Disabled
Arrow Concatenate variable w/ path string ...


bump

what if, after the xyz0002 part of the URL there was some more text, so he had to concatenate the string could you still do that in wget in the same way?
 
Old 07-20-2012, 03:01 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you just put more text after it. all in the manpage.
 
Old 07-22-2012, 04:41 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Necropost much? Split out thread-jack, please add context to your own question.
 
Old 07-22-2012, 06:12 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143Reputation: 2143
I assume you mean something like:
Code:
wget -r -np -nd -A "*.jpg" http://www.domain.com/${myvar1}/images/${myvar2}/personal/
Am I right? You can just keep throwing in text and variables all you want. Just make sure you put the variables in {} so the shell knows where the variable name ends and the rest of the text begins.
 
1 members found this post helpful.
Old 07-22-2012, 06:50 PM   #5
spaghettios
LQ Newbie
 
Registered: Jul 2012
Location: UK
Distribution: Ubuntu, Slackware
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
I assume you mean something like:
Code:
wget -r -np -nd -A "*.jpg" http://www.domain.com/${myvar1}/images/${myvar2}/personal/
Am I right? You can just keep throwing in text and variables all you want. Just make sure you put the variables in {} so the shell knows where the variable name ends and the rest of the text begins.
Yes, i have a lot of text either side of a date in the url, got it now. Thanks!
 
  


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 path issue - how to pass a path as a string to a variable PiNPOiNT Programming 5 04-17-2009 06:48 PM
Need shell script to concatenate a string and a variable into a directory name AwesomeMachine Linux - Newbie 2 05-07-2006 04:42 AM
PL/PGSQL - String concatenate problem jaunine Linux - Software 7 03-18-2005 08:11 AM
how to concatenate variable name in Java ? black Programming 1 11-16-2004 05:08 AM

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

All times are GMT -5. The time now is 04:09 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