The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Searching for text in a Space delimited File
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Searching for text in a Space delimited File
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
11-27-2007
vgersh99
Moderator
Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
Assuming that a sample log file record is one on ONE line...
one way:
Code:
sed
's/.*dst_port=\([^ ][^ ]*\).*/\1/' myLogFile
P.S. Pls use
vB Codes
when quoting sample data/source - no line wraps either.
vgersh99
View Public Profile
Find all posts by vgersh99
Find vgersh99's past nominations received
Find vgersh99's present nominations given