Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Linux only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Linux
How to get a specific word in a file?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
2
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
1
2
template
Next
coaxfiber
New Member
Join Date:
Mar 2007
Posts:
60
#16
Aug 16 '07, 04:15 PM
Originally posted by
marimuthup
with awk or grep how would I get a specific word in a file, rather than a lin.
For example:
File contains lines such as
This is MyTime:00:0450 Secs
I wanna to extract the String where it is between 'MyTime:' and Secs, where I need only the String '00:0450' printed.
Definelty not the entire row.
Could some one help me?
Hi,
Try this one assuming line 'MyTime:00:0450 Secs' is fix and only the numbers are varying,
cut -c 8-14 file.txt
FYI.
-coax
Comment
Post
Cancel
Previous
1
2
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment