07-10-2008
Cool thanks. How would it be possible to sort that output by IP address but also by idle time? So it would show first grouped by IP, then within that sorted by idle time?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
Please let me know how I can put a comment (e.g // or #) to more than 50 lines using vi editor in a .cpp/.sh file.
Thanks in advance. (3 Replies)
Discussion started by: artikulkarni
3 Replies
2. Shell Programming and Scripting
I have a file that contains the following lines
the brown quick fox
jumped over
the white laze dog
0123456789
I wanted to put the contents of this file into a variable so I used this code:
VAR_LIST=`cat $2`
where $2 is the file name passed as an argument to the script
If I... (3 Replies)
Discussion started by: Nomaad
3 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I have a file which contains comments,dotted lines(-------),actual records etc.I need to fetch only the actual records and put into a new file neglecting/deleting other rows.I have a header record too which contains the column names for the actual records.i need to discard this too.how... (5 Replies)
Discussion started by: ganesh_248
5 Replies
4. Shell Programming and Scripting
Hello,
Is there any way in awk to put every line of a file in an array and so we can like this print the line we want.
For example, if we have this file
aaa eee
bbb fff
ccc ggg
ddd hhh
So we can print to the output the 3rd line only
ccc ggg
If it is possible, please put the... (7 Replies)
Discussion started by: rany1
7 Replies
5. Shell Programming and Scripting
Hi,
my xml files looks something like this
<Instance Name="New York">
<Description></Description>
<Instance Name="A">
<Description></Description>
<PropertyValue Key="false" Name="Building A" />
</Instance>
<Instance Name="B">
... (4 Replies)
Discussion started by: tententen
4 Replies
6. Shell Programming and Scripting
Dear all,
I'm trying to manipulate a data file and putting a certain lines into one paragraph.
What am I actually want to do is that search some lines in a data file. These lines begin with "1\1\GINC-" and end with "\\@" or the following two empty lines as shown in blue.
A part of the text... (11 Replies)
Discussion started by: liuzhencc
11 Replies
7. Programming
hi
I need a little help writing this small perl script. I'm trying to extract the values from each line in a file and find the average for example
cat school
Highschool 100, 123, 135
Middleschool 41, 67, 54
Elementary 76, 315, 384
./average.pl
highschool: 119.3
middleschool: 54... (2 Replies)
Discussion started by: gengar
2 Replies
8. Shell Programming and Scripting
Hi all, I'm quite newbie in shell scripting but I found a problem what I cant solve.
I have a .txt file which looks like this:
/22/
/23/
/24/
and so on and I'd need to make it look like this:
/22/|/23/|/24/|...and so on.
these numbers are growing and has lines like this /2a/ as well.... (15 Replies)
Discussion started by: gergo235
15 Replies
9. Shell Programming and Scripting
I really can't figure this one out.
I have 2 files, one file is a list of hostnames and the other is a list of their corresponding IPs:
fileA:
example.com
another.org
thirdie.net
fileB:
1.1.1.1
2.2.2.2
3.3.3.3
I want to create a fileC that looks like:
example.com 1.1.1.1... (2 Replies)
Discussion started by: zstar
2 Replies
10. Shell Programming and Scripting
Hello,
I haven't been here for a while and I might be forgetting some things.
I have an input text like this
titleA
http://myurl/bla/blabla/1234
http://myurl/bla/blabla/6789
titleB
http://myurl/bla/blabla/5678
http://myurl/bla/blabla/1234
titleC
http://myurl/bla/blabla/9123... (10 Replies)
Discussion started by: Kibou
10 Replies
LEARN ABOUT MOJAVE
curlopt_tcp_keepidle
CURLOPT_TCP_KEEPIDLE(3) curl_easy_setopt options CURLOPT_TCP_KEEPIDLE(3)
NAME
CURLOPT_TCP_KEEPIDLE - set TCP keep-alive idle time wait
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TCP_KEEPIDLE, long delay);
DESCRIPTION
Pass a long. Sets the delay, in seconds, that the operating system will wait while the connection is idle before sending keepalive probes.
Not all operating systems support this option.
DEFAULT
60
PROTOCOLS
All
EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* enable TCP keep-alive for this transfer */
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1L);
/* set keep-alive idle time to 120 seconds */
curl_easy_setopt(curl, CURLOPT_TCP_KEEPIDLE, 120L);
/* interval time between keep-alive probes: 60 seconds */
curl_easy_setopt(curl, CURLOPT_TCP_KEEPINTVL, 60L);
curl_easy_perform(curl);
}
AVAILABILITY
Added in 7.25.0
RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO
CURLOPT_TCP_KEEPALIVE(3), CURLOPT_TCP_KEEPINTVL(3),
libcurl 7.54.0 January 02, 2017 CURLOPT_TCP_KEEPIDLE(3)