Read version from a webpage and Upgrading the file.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Read version from a webpage and Upgrading the file.
# 1  
Old 03-13-2014
Apple Read version from a webpage and Upgrading the file.

Hi,

I am trying to read version from a web url like <url/daily-builds/sdk-3.2.v20140312170355-osx.zip> [here v20140312170355 denotes date-time]
and download and store in my filesystem if its the latest.

Kindly help me how to read version 3.2.v20140312170355 and compare same with a folder named similar in my directory and download the latest if not already downloaded.
I have tried curl -O <url/daily-builds/sdk-3.2.v20140312170355-osx.zip>

which only downloads the file for me without checking that its the latest or not.
# 2  
Old 03-13-2014
I am not sure what you want to do here..but below is the code to capture APP_NAME, Version, Sub Version & Time stamp
Code:
awk '{split($0, a, "/"); split(a[length(a)], b, "-"); split(b[2], c, "."); print b[1], c[1], c[2], c[3]}'

You can add the below and do you manipulations
Code:
while read APP_NAME VERSION SUB_VERSION TIME_STAMP

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing information to a file on webpage

ok so I have a file on a website. this file is a plain text file i need to be able to update the contents of this file from any internet enabled unix box. does anyone have ideas on how it can be done, without using scp/ftp? i know wget can be used to download the file: wget... (3 Replies)
Discussion started by: SkySmart
3 Replies

2. Programming

Async webpage read

hi i need to asynchronous connect to webpage which has only text file. need to read its content, line by line using linux socket. any samples? (1 Reply)
Discussion started by: leo2008
1 Replies

3. Shell Programming and Scripting

Copy a file from directroy/ prior version to the directory/ new version

How to copy a file from directroy/ prior version to the directory/ new version automatically. (4 Replies)
Discussion started by: roy1912
4 Replies

4. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

5. HP-UX

Questions Regarding Upgrading To New Version Of Apache Web Server

In September 2010, HP released the following bulletin: Subject: End of Support Life for “Apache version 2.0 along with WSS version 2.x” on 11iv2 and 11iv3. Reference: http://www.hp.com/softwarereleases/releases-media2​/notices/082010Apache.pdf I have some questions about this... (4 Replies)
Discussion started by: Rob Sandifer
4 Replies

6. Shell Programming and Scripting

Read webpage from shell script

Hey experts, I am trying to read a webpage and want to search for a text patter (case insensitive). Please help me acquire this. If the text is found i will receive a mail which can be hardcoded in the script. I am not a big fan of using PERL script. Please help. Machine: AIX... (15 Replies)
Discussion started by: bankimmehta
15 Replies

7. Programming

socket function to read a webpage (socket.h)

Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct... #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include... (3 Replies)
Discussion started by: cyler
3 Replies

8. Ubuntu

Upgrading 9.04 version 9.10 - slow boot time

After upgrading my 9.04 version to the 9.10 my boot time duplicates. I don´t know the reason why the time of boot gets to the double. Someone ??? Thx. (1 Reply)
Discussion started by: diesan
1 Replies

9. Shell Programming and Scripting

cat a file on webpage

Hi, Is there a way to cat a file on Webpage? . Thanks in advance (3 Replies)
Discussion started by: rider29
3 Replies

10. UNIX for Advanced & Expert Users

Flare version question... Upgrading from Cx400 Cx500 disks

EMC is asking what flare version servers are at. Does HPUX use flare and how can you find it? :confused: (0 Replies)
Discussion started by: rfmurphy_6
0 Replies
Login or Register to Ask a Question