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 OSF1
services
services(4) Kernel Interfaces Manual services(4)NAME
services - Defines the sockets and protocols used for Internet services
SYNOPSIS
/etc/services
DESCRIPTION
The /etc/services file associates Internet service names and aliases with the port number and protocol used by the service. Each service
is listed in this file on a single line of the form: ServiceName PortNumber/ProtocolName Aliases
The fields contain the following information: The official Internet service name. The socket port number used for the service and the
transport protocol used for the service. A list of unofficial service names.
Items on a line are separated by spaces or tabs. Comments begin with a # (number sign) and continue to the end of the line.
EXAMPLES
Entries in the /etc/services file for the inetd internal services might look like this: echo 7/tcp echo 7/udp discard
9/tcp sink null discard 9/udp sink null daytime 13/tcp daytime 13/udp chargen 19/tcp ttytst source
chargen 19/tcp ttytst source ftp 21/tcp time 37/tcp timeserver time 37/udp timeserver
RELATED INFORMATION
Functions: endservent(3), getservbyname(3), getservbyport(3), getservent(3), setservent(3)
The RFC923 specification. delim off
services(4)