11-09-2013
........................................................
Last edited by BaxxterHp; 11-09-2013 at 04:58 PM..
10 More Discussions You Might Find Interesting
1. SCO
Hello,
I am having performance problem when , i ported a c code from Unixware 2.1 to Unixware 7.0.0.
My program establishes a synchornous connection with the client in a windows OS and then sends and receives messsages using the recv and send calls.
What i hyave noticed is that after a... (0 Replies)
Discussion started by: Amith
0 Replies
2. UNIX for Advanced & Expert Users
All
i am struggling to raplace some text in a line between two (closest) patterns ,
line="/home/usr/bin/:/home/usr/devuser,n1.9/bin:/home/usr/root/bin"
i want to replace "devuser,n1.9" with "NEWVAL", basically all teh text from "devuser" until nearest '/' with some new text.
i tried teh... (1 Reply)
Discussion started by: sudheer1984
1 Replies
3. Shell Programming and Scripting
Hi
I am having some problom deleting the lines between two specific lines in a file. need to delete lines between two closest lines. i.e need to find the closest range or pattern in a file with repeating patterns.
Sample Input:
WARNING
<some text in n number of lines>
ERROR:2597... (10 Replies)
Discussion started by: sudheer1984
10 Replies
4. Shell Programming and Scripting
out of a range of numbers, how can i pick out the number that is the closest to any arbitrary/random number that a user supplies?
say the range of numbers are between 1 - 90000. but that doesn't mean each number exist between 1 - 90000. the range of numbers could be for example:
1, 3, 4, 6,... (6 Replies)
Discussion started by: SkySmart
6 Replies
5. Solaris
Hi all. Im new to programming and Unix. Want to start learning to use Solaris 11. I have 2 boxes currently and want to run an all in one Solaris Box to act as a file server, web server ect. I want to use the second box as my main programming box that is as close to a Solaris OS as possible that has... (3 Replies)
Discussion started by: Fingerz
3 Replies
6. Shell Programming and Scripting
Hi,
Is this possible? I want to take a csv file and find the closest value in another csv file preceding it and following it.
For ex. In this csv file, I'll take the first line:
1309341156.800000000
1309341156.802500000
1309341156.805000000
1309341156.807500000
and find the closest... (2 Replies)
Discussion started by: superbbrr
2 Replies
7. Shell Programming and Scripting
Hi all
I have a great challenge that I am not able to resolve.
Briefly, I have a file like this:
ID_1 chr1 100 -
ID_2 chr2 300 +
and another file like this:
name_1 chr1 150 no -
name_2 chr1 250 yes -
name_3 chr2 350 yes +
name_4 chr2 280 yes +
Well, for each entry in file1 I would... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
8. Shell Programming and Scripting
Hi All
I am sorry but I have to open a new thread about my issue.
My input files are:
file_1
ID_1 10
ID_2 15
ID_3 32
ID_4 45
ID_5 66
ID_6 79
ID_7 88
file_2
ID_3
ID_5My output file should be
ID_3 ID_1(-22) ID_2(-17) ID_4(-13) ID_5(34) (5 Replies)
Discussion started by: giuliangiuseppe
5 Replies
9. Shell Programming and Scripting
so i have a code that identifies which value is the closest to a value provided by the user.
awk -F"," -v c=${COLUMN} -v t=${USTIME} '{a=$c}END{
asort(a);d=a-t;d=d<0?-d:d;v = a
for(i=NR-1;i>=1;i--){
m=a-t;m=m<0?-m:m
if(m<d){
... (3 Replies)
Discussion started by: SkySmart
3 Replies
10. Shell Programming and Scripting
In the example below i would want the extensions to match.
Is there any other utility or script to achieve this. Kindly help.
Example:
sdiff sourceFileNames targetFileNames
17021701P.blf | 17021901P.ibk
17021701P.chn | 17021901P.irk
17021701P.bmr | 17021901P.dyd
17021701P.dpf |... (7 Replies)
Discussion started by: jamilpasha
7 Replies
LEARN ABOUT CENTOS
sd_journal_seek_monotonic_usec
SD_JOURNAL_SEEK_HEAD(3) sd_journal_seek_head SD_JOURNAL_SEEK_HEAD(3)
NAME
sd_journal_seek_head, sd_journal_seek_tail, sd_journal_seek_monotonic_usec, sd_journal_seek_realtime_usec, sd_journal_seek_cursor - Seek to
a position in the journal
SYNOPSIS
#include <systemd/sd-journal.h>
int sd_journal_seek_head(sd_journal* j);
int sd_journal_seek_tail(sd_journal* j);
int sd_journal_seek_monotonic_usec(sd_journal* j, sd_id128_t boot_id, uint64_t usec);
int sd_journal_seek_realtime_usec(sd_journal* j, uint64_t usec);
int sd_journal_seek_cursor(sd_journal* j, const char * cursor);
DESCRIPTION
sd_journal_seek_head() seeks to the beginning of the journal, i.e. the oldest available entry.
Similarly, sd_journal_seek_tail() may be used to seek to the end of the journal, i.e. the most recent available entry.
sd_journal_seek_monotonic_usec() seeks to the entry with the specified monotonic timestamp, i.e. CLOCK_MONOTONIC. Since monotonic time
restarts on every reboot a boot ID needs to be specified as well.
sd_journal_seek_realtime_usec() seeks to the entry with the specified realtime (wallclock) timestamp, i.e. CLOCK_REALTIME. Note that the
realtime clock is not necessarily monotonic. If a realtime timestamp is ambiguous, it is not defined which position is sought to.
sd_journal_seek_cursor() seeks to the entry located at the specified cursor string. For details on cursors, see sd_journal_get_cursor(3).
If no entry matching the specified cursor is found the call will seek to the next closest entry (in terms of time) instead. To verify
whether the newly selected entry actually matches the cursor, use sd_journal_test_cursor(3).
Note that these calls do not actually make any entry the new current entry, this needs to be done in a separate step with a subsequent
sd_journal_next(3) invocation (or a similar call). Only then, entry data may be retrieved via sd_journal_get_data(3). If no entry exists
that matches exactly the specified seek address, the next closest is sought to. If sd_journal_next(3) is used, the closest following entry
will be sought to, if sd_journal_previous(3) is used the closest preceding entry is sought to.
RETURN VALUE
The functions return 0 on success or a negative errno-style error code.
NOTES
The sd_journal_seek_head(), sd_journal_seek_tail(), sd_journal_seek_monotonic_usec(), sd_journal_seek_realtime_usec(), and
sd_journal_seek_cursor() interfaces are available as a shared library, which can be compiled and linked to with the libsystemd-journal pkg-
config(1) file.
SEE ALSO
systemd(1), sd-journal(3), sd_journal_open(3), sd_journal_next(3), sd_journal_get_data(3), sd_journal_get_cursor(3),
sd_journal_get_realtime_usec(3)
systemd 208 SD_JOURNAL_SEEK_HEAD(3)