Link to home
Start Free TrialLog in
Avatar of amankhan2005
amankhan2005Flag for India

asked on

unix script help required for date

Hi All,

  I need to pass data values to the weblink below.

For ex:

   If I type the below command @unix prompt:

[appltest@test ~]$ date +"%m-%d-%y"
01-24-13

   I get 01-24-13 and want to pass these values to the below so that daily it takes values of that day and pass it to the weblink.


http://www.tcmb.gov.tr/kurlar/201301/24012013.html

 In the above link, I need to pass year and month after kular/%year%month%/%day%month%year%.html

  So that daily it will pick up with different days and month values like:

If 24-01-13, then weblink should be:

http://www.tcmb.gov.tr/kurlar/201301/24012013.html

If 25-01-13, then weblink should be:

http://www.tcmb.gov.tr/kurlar/201301/25012013.html

and if Feb i.e 04-02-13, then:

http://www.tcmb.gov.tr/kurlar/201302/04022013.html

  Any ideas...Help Appreciated..

Thanks
Aman
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

URL="http://www.tcmb.gov.tr/kurlar/$(date +%Y%m/%d%m%Y).html"

echo $URL
ASKER CERTIFIED SOLUTION
Avatar of johnsone
johnsone
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial