11-02-2011
Thanks very much. That works perfectly!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a file in which I have 5 columns which are delimited by “|” as shown
ABC|12|YAK|METRIC|000000019.5
XYZ|10|ABX|META|000000002.5
Now my requirement is to take the last column trim the leading zero's for that column values and write back to the same file in the same... (7 Replies)
Discussion started by: nvuradi
7 Replies
2. Shell Programming and Scripting
I have a data file with two columns,
for the second column I want to find the minimum,
and subtract this minimum from each value in the second column,
how to realize this using C shell
For example, I have
1 -2.4
2 -4.8
3 7.9
I wanna output
1 2.4
2 0
3 12.7
Thanks! (4 Replies)
Discussion started by: rockytodd
4 Replies
3. Shell Programming and Scripting
removing leading zeros for a decimal column in a file which has string & decimal values
,,,,,6630140,XXXXXXXXXXXXXXX, 0020.00,USA
,,,,,6630150,XXXXXXXXXXXXXXXL (xyz, 0010.00,USA
,,,,,6630150,XXXXXXXXXXXXXXX(xyz), 1300.00,USA
My file contains 9 columns. Out 9 columns, 8th column contains the... (9 Replies)
Discussion started by: marpadga18
9 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a file like:
0.000000 124.085533 124.085533 124.085533 124.085533 124.085533 124.085533 124.085533 124.085533 124.085533 33.097845 33.363764
0.000000 266.483441 262.519130 266.380993 274.989622 289.594799 309.523518 336.124848 372.386124 413.522043 429.984825 421.621810... (6 Replies)
Discussion started by: cosmologist
6 Replies
5. Shell Programming and Scripting
Hi All,
I have 100 files with names like this:
1.dat, 2.dat, 3.dat until 100.dat.
My dat files look like this:
42323 0
438939 1
434 0
0.9383
3434
120.23 3
234
As you can see in the second column, some numbers are missing. I want to fill those missing places with 0's in all... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
6. Shell Programming and Scripting
Experts,
I am finding the split up of the Servers which uses the netstat on a specific port.
netstat -a | grep -w 9071 |grep ESTABLISHED | awk '{print $5}' | cut -d'.' -f1 | sort -n | uniq -c
1 ser7b
1 ser7c
2 ser7d
2 ser7e
1 ser7f
1 ser7h
1 ser7i
1 ser8bI am... (5 Replies)
Discussion started by: sathyaonnuix
5 Replies
7. Shell Programming and Scripting
Hi,
I've got what is probably quite an easy little (presumably) awk problem that I just can't seem to work out (mental block...I've already spent ages getting the data into this format!). I want to work out the difference between rows for certain columns. for example:
1359142876 RED 14... (3 Replies)
Discussion started by: chrissycc
3 Replies
8. Shell Programming and Scripting
I have the following script that will print column 4 ("25") when column 1 contains "123". However, I need to ignore the alpha characters that are contained in the input file. If I were to ignore the characters my output would be column 3.
What is the best way to print my column of interest... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
9. Shell Programming and Scripting
Need your support for below. Please help to get required output
If column 5 is INV then only consider column1 and take out duplicates/identical rows/values from column1 and then put minimum value of column6 in column7 and put maximum value in column 8 and then need to do subtract values of... (7 Replies)
Discussion started by: as7951
7 Replies
10. Programming
Hi All,
I would like get the minimum value in the certain column with respect to other column.
For example, I have a text file like this.
ATOM 1 QSS SPH S 0 -2.790 -1.180 -2.282 2.28 2.28
ATOM 1 QSS SPH S 1 -2.915 -1.024 -2.032 2.31 2.31
ATOM 1 ... (4 Replies)
Discussion started by: bala06
4 Replies
LEARN ABOUT MOJAVE
curlopt_timeout
CURLOPT_TIMEOUT(3) curl_easy_setopt options CURLOPT_TIMEOUT(3)
NAME
CURLOPT_TIMEOUT - set maximum time the request is allowed to take
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TIMEOUT, long timeout);
DESCRIPTION
Pass a long as parameter containing timeout - the maximum time in seconds that you allow the libcurl transfer operation to take. Normally,
name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations.
This option may cause libcurl to use the SIGALRM signal to timeout system calls.
In unix-like systems, this might cause signals to be used unless CURLOPT_NOSIGNAL(3) is set.
If both CURLOPT_TIMEOUT(3) and CURLOPT_TIMEOUT_MS(3) are set, the value set last will be used.
Since this puts a hard limit for how long time a request is allowed to take, it has limited use in dynamic use cases with varying transfer
times. You are then advised to explore CURLOPT_LOW_SPEED_LIMIT(3), CURLOPT_LOW_SPEED_TIME(3) or using CURLOPT_PROGRESSFUNCTION(3) to imple-
ment your own timeout logic.
DEFAULT
Default timeout is 0 (zero) which means it never times out during transfer.
PROTOCOLS
All
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* complete within 20 seconds */
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 20L);
curl_easy_perform(curl);
}
AVAILABILITY
Always
RETURN VALUE
Returns CURLE_OK
SEE ALSO
CURLOPT_TIMEOUT_MS(3), CURLOPT_CONNECTTIMEOUT(3), CURLOPT_LOW_SPEED_LIMIT(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_TIMEOUT(3)