I have a file output.txt. File looks like this
I get a number n and I need to remove all lines which has number (after name) smaller or equal to n number.
After that I need to write lines from file and my output must be like this:
Thank you for your help
Last edited by Scrutinizer; 10-25-2018 at 11:47 AM..
Reason: Code Tags
Hi,
I have gps receiver log..its giving readings .like below
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GPSD,R=1
$GPGSV,3,1,11,08,16,328,40,11,36,127,00,28,33,283,39,20,11,165,00*71... (3 Replies)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Hi,
i have file which contains data as below(Only sample shown, it may contain more data similar to the one shown here)
i need to read this file line by line and generate an output file like the one below
i.e based on N value the number of MSISDNs will vary, if N=1 then the following... (14 Replies)
Hi ,
I am trying to write an shell, which reads a text file (from a location) having a list of numbers of strictly 5 digits only ex: 33144
Now my script will check :
1) that each entry is only 5 digits & numeric only, no alphabets, & its not empty.
2)then it executes a shell script called... (8 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
I have a test file that I want to read and insert only certain lines into the
the table based on a filter.
1. Rread the log file 12 Hours back Getdate() -12 Hours
2. Extract the following information on for lines that say "DUMP is
complete"
A. Date
B. Database Name
C.... (2 Replies)
Hi All,
Am trying to write wrapper shell/bash script on a utility tool for which i need to pass 2 files as arugment to execute utility tool.
Wraper script am trying is to do with above metion 2 files.
utility tool accepts :
a. userinfo file : which contains username
b. item file : which... (2 Replies)
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
i have a text file as belows, it includes 2 columns, 1st is the column name, 2nd is the file_name
data_file.txt
column_name file_name
col1 file1
col2 file2
col3 file1
col4 file1
col5 file2
now, i would like to... (4 Replies)
Discussion started by: tester111
4 Replies
LEARN ABOUT OPENSOLARIS
net_instance_protocol_unregister
net_protocol_notify_register(9F) Kernel Functions for Drivers net_protocol_notify_register(9F)NAME
net_protocol_notify_register, net_instance_protocol_unregister - add/delete a function to be called for changes to a protocol
SYNOPSIS
#include <sys/hook.h>
#include <sys/neti.h>
int net_protocol_notify_register(net_handle_t family,
hook_notify_fn_t *callback, void *arg);
int net_protocol_notify_unregister(net_handle_t family,
hook_notify_fn_t *callback);
typedef int (* hook_notify_fn_t)(hook_notify_cmd_t command,
void *arg, const char *name1, const char *name2, const char
*name3);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
family value returned from net_protocol_lookup().
callback function to call when a change occurs.
arg pointer to pass into the callback() function when a change occurs.
DESCRIPTION
The net_protocol_notify_register() function registers a function represented by the pointer callback to be called when there is a change to
the protocol represented by family. The types of changes for which notifications are available for is currently limited to the addition and
removal of protocols.
The net_protocol_notify_unregister() function removes the function specified by the pointer callback from the list of functions to call.
This call may fail if the specified function cannot be found.
Multiple callback functions may be registered through this interface. The same set of parameters is passed to each callback function. The
memory referenced through the pointers passed to the callback should be treated as pointing to read-only memory. Changing this data is
strictly prohibited.
The function that is called must not block any other protocols.
The arguments passed through to the callback are as follows (the command is either HN_REGISTER or HN_UNREGISTER):
name1 is the name of the protocol
name2 is NULL.
name3 is the name of the protocol being added/removed
RETURN VALUES
If these functions succeed, 0 is returned. Otherwise, the following error is returned:
EEXIST the given callback function is already registered.
CONTEXT
These functions may be called from user or kernel context.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO attributes(5), net_protocol_lookup(9F)SunOS 5.11 30 Oct 2008 net_protocol_notify_register(9F)