Assuming that a sample log file record is one on ONE line...
one way:
P.S. Pls use vB Codes when quoting sample data/source - no line wraps either.
The above code sed 's/.*dst_port=\([^ ][^ ]*\).*/\1/' myLogFile
, is this the sed command being used with regular expression syntax?
If so what does the s do, I know that / means search
Andy
how to replace the 3rd colum? Each line begins similarly, but they all ends variously.
XX YY 03 variable text here
XX YY 03 more variable text here
XX YY 03 even more variable text here really long setence
XX YY 03 variable numbers also appear 03 11. 123 456
XX YY 03 the occasional comma,... (4 Replies)
I have a space delimited text file with 1,000,000+ columns and 100 rows. I want to delete columns 2 through 5 (2 and 5) included from the text file. How do I do that? Thanks. (3 Replies)
I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the cells that consist of just 2 (leave 2's that are not by themselves intact):
File before modification
aa bb cc 2 NA100 dd
aa b1 c2 2 NA102 de
File after modification... (1 Reply)
How do you delete cells from a space delimited text file given row and column number? Letś say the row number is r and the column number is c. Thanks! (5 Replies)
I have a space delimited text file with 1,000,000+ columns? I would only like to view specific ones (let's say through 1:10), how can I do that? Thanks! (3 Replies)
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Hi,
I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
LEARN ABOUT CENTOS
portreserve
PORTRESERVE(1) TCP port reservation utility PORTRESERVE(1)NAME
portreserve - reserve ports to prevent portmap mapping them
SYNOPSIS
portreserve
DESCRIPTION
The portreserve program aims to help services with well-known ports that lie in the bindresvport range. It prevents portmap (or other
programs using bindresvport) from occupying a real service's port by occupying it itself, until the real service tells it to release the
port (generally in its init script).
It is intended that portreserve runs from an initscript of its own, and services wishing to interact with it should use portrelease.
When the portreserve daemon is started, it examines the /etc/portreserve/ directory. Each file not containing "." or "~" in its name is
considered to be a service configuration file, and must contain a service name (as listed in /etc/services) or a port number. UDP services
may be specified by appending "/udp" to the service name, and TCP services by "/tcp". Several services may be specified, one per line.
For example, /etc/portreserve/cups might contain the string "ipp" or, equivalently, "ipp/tcp" and "ipp/udp" on separate lines.
For each service configuration file, a socket is created and bound to the appropriate port. A service wishing to bind to its port must
first run portrelease, which instructs portreserve to release the port associated with the service.
Once all the reserved ports have been released, the daemon exits.
FILES
/etc/portreserve/*
Service configuration files
/var/run/portreserve/socket
communication socket for portrelease
SEE ALSO portrelease(1)AUTHOR
Tim Waugh <twaugh@redhat.com>
Author.
portreserve 1 July 2008 PORTRESERVE(1)