Hi
i need to print pathname in which the string present using 'find' command
sample output like this
Pathname String to be searched
---------- --------------------
/usr/test/myfile get
/opt/test/somefile get
Thanks in... (4 Replies)
Hi,
I need to find a string, if it finds then I need to print it , otherwise it has to goto next line....
input is====>
uid = shashi, india uid ,uid= asia
uid= none, uid=india. none
==========
output shold be
uid = shashi, india
uid ,
uid= asia
uid= none,
uid=india. none
... (1 Reply)
Hi
Need a perl script to read lines in a file, scan for a string named "APPLE" and write to different file the only lines containing the matched string. (5 Replies)
I am parsing a nagios config, searching for a string, and then printing the line 2 lines later (the "members" string). Here's the data:
define hostgroup{
hostgroup_name chat-dev
alias chat-dev
members thisisahostname
}
define hostgroup{
... (1 Reply)
Hi All,
Please tell me how can I Find a string using grep & print the line above or below that in solaris?
Please share as I am unable to use grep -A or grep -B as it is not working on Solaris. (10 Replies)
What's the easiest way to search a file for a specific string and then look for other instances after that? I want to search for all Virtual Hosts and print out the Server Name and Document Root (if it has that info), while discarding the rest of the info.
Basically my file looks like this:
...... (6 Replies)
Hello all,
I need to find the longest string in a select field and print that field.
I have tried a few different methods and I always end up one step from where I need to be.
Methods thus far:
nawk '{if (length($1) > long) long=length($1); if(length($1)==long) print $1}'
The above... (6 Replies)
i have a file that looks like this
ABC123
aaaaaaaaaaaaaaasssssssssssssssffhhh
ABC234
EMPTY
ABC652
jhfffffffffffffffffffffffffffffffffffkkkkkkkkkkkk
i want to grep "EMPTY" and print ABC234 (3 Replies)
I'm trying find and print a number after a specific user passed string in each line of a text file using C (as requested by the powers that be). I've pieced together enough to read the file, find the string and print the line it was found on but I’m not sure where to even start in terms of finding... (3 Replies)
Ok I would like to do the following
file test contains the following lines. between the lines ABC there may be any amount of lines up to the next ABC entry.
I want to grep for the filename.txt entry and print the lines in between (and including that line) up to and including the last line... (3 Replies)
Discussion started by: revaroo
3 Replies
LEARN ABOUT DEBIAN
rds-gen
RDS-GEN-SINK(1) BSD General Commands Manual RDS-GEN-SINK(1)NAME
rds-gen -- write data from a file to an RDS socket
rds-sink -- write data from an RDS socket to a file
SYNOPSIS
rds-gen [-s source_address:source_port] [-d destination_address:destination_port] [-f input_file] [-m message_size] [-l total_bytes]
[-i interval]
rds-sink [-s listen_address:listen_port] [-f output_file] [-i interval]
DESCRIPTION
The rds-gen and rds-sink utilities are used to stream data through RDS sockets. rds-gen reads data from a file descriptor and sends it as
messages down an RDS socket. rds-sink receives messages from an RDS socket and writes it to a file descriptor.
The following options are shared between rds-gen and rds-sink:
-s address:port
Binds the RDS socket to the given address and port. rds-gen will send messages from this address and port. rds-sink will receive
messages sent to this address and port.
-f file
rds-gen will read data from this file and rds-sink will write data to this file. If '-' is given as the filename then rds-gen will
use standard input and rds-sink will use standard output.
-i interval_seconds
An iterative summary of the number and size of messages that are sent and received is written to standard error at this interval.
In addition, rds-gen supports the following options:
-d address:port
Messages are sent to this destination address and port. If this option is specified multiple times then the messages are sent to
each destination address in a round-robin fashion.
-m message_size
Specifies the size of the messages that are sent down the RDS socket. The default message size is 4k. The message size must not be
greater than the buffer size.
-l total_bytes
Specifies the number of bytes that will be sent out the socket before rds-gen exits. If this is not specified and rds-gen was given
a source file then it will run until it gets EOF from the file. If no file was given and this option is not specified then rds-gen
will send data indefinitely.
EXAMPLES
rds-gen on host src sends infinite data to rds-sink on dest who prints out the amount of data it receives every second.
$ rds-sink -s dest:22222 -i 1
$ rds-gen -s src:11111 -d dest:22222
Read 100M from /dev/zero on src and write it to /dev/null on dest, printing stats on both sides every minute.
$ rds-sink -s dest:22222 -f /dev/null -i 60
$ rds-gen -s src:11111 -f /dev/zero -d dest:22222 -i 60
Watch rds-gen write data as fast as it can into a local black hole because there is no bound receiving socket.
$ rds-gen -s src:11111 -d localhost:31337 -i 1
BSD October 30, 2006 BSD