![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| number of occurences of a string | siddu_chittari | Shell Programming and Scripting | 12 | 12-05-2006 01:09 AM |
| $A is a number / any other string? How to determine ? | csaha | Shell Programming and Scripting | 2 | 02-21-2006 04:03 AM |
| How to format number/string in ksh | GNMIKE | Shell Programming and Scripting | 2 | 07-03-2005 03:44 PM |
| string to number | George_king | Shell Programming and Scripting | 2 | 09-10-2003 04:48 PM |
| shell to number and to string | xiamin | Shell Programming and Scripting | 1 | 11-06-2001 08:59 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
awk/sed - getting string instead of number
Hi!
I am writing a script handling downloading list of files and I have to check whether file is present locally and if not finished than continue downloading. To do so I have to compare sizes of remote file and local file. To check remote file size I have to parse something like this: Code:
Moon:~ jaja$ curl --cookie /tmp/rpd-cookie.txt -I -L -s http://domain.com/path/to/some/file.zip HTTP/1.1 200 OK P3P: CP="ALL DSP COR CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa CONa TELa OUR STP UNI NAV STA PRE" Date: Mon, 24 Mar 2008 07:49:21 GMT Accept-Ranges: bytes Content-Disposition: Attachment; filename=S02E02_20Simpson_20and_20Delilah.mp4 Content-Type: application/octet-stream Content-length: 80566953 Connection: Keep-Alive Code:
REMOTESIZE=`curl --cookie /tmp/rpd-cookie.txt -I -L -s $1 | grep Content-length | awk '{print $2}'`
Anyone could give me some tip? It's bash-script. Thanks hrwath |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|