LinuxQuestions.org
Register a domain and help support LQ
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 01-08-2014, 02:19 AM   #1
oracle765
LQ Newbie
 
Registered: Jan 2014
Posts: 1

Rep: Reputation: Disabled
Linux Newbie stuck with cronjob


Hi professionals

I have written a sh file to download a csv file from an affiliate, problem is in the url part of the script the merchant has $ signs in the url which causes the url to not display correctly so I only get a empty csv file.

If I paste the url into the browser I can get the file fine
here is my script, cronjob and how it actually ends up displayed. Any ideas

CRON
* * * * * /home/oracle765/public_html/scripts/feedimport.sh


SH FILE
/usr/bin/wget -O "/home/oracle765/public_html/feed/crazysales.csv" "http://dashboard.commissionfactory.com.au/Affiliate/Creatives/DataFeeds/jPvRtY22g7Od7pizj7SX5Mai1O$Aspa1hOXb8Yzlm7at4KOk4uyktvrtreLs8qHktLey$bT$9fCjt7m2uvn79YfvluHFssOl2vfS lK6Dfg==/";


Results

http://dashboard.commissionfactory.c...l2vfSlK6Dfg==/
 
Old 01-08-2014, 09:11 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

I think you can either escape them: Ie replace each "$" with "\$" or put the url in single quotes instead of double quotes. Eg
Code:
wget 'http://somewhere/foo$bar'
HTH,

Evo2.
 
  


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




All times are GMT -5. The time now is 04:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration