Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UNIX - how do i split lines in an AIX file where a time (h:mm or hh:mm)) variable occurs..... 1

Status
Not open for further replies.

pneumatic

Technical User
Aug 6, 2003
11
GB
i.e. the one in the middle of each?

can someone please help me to do this, i've tried split, cut, sed, awk all to no avail. i'm obviously missing something here. note the number of name fields change and for what its worth there are <tabs> in each line as well. i'm looking to split each line immediately after the time in the middle occurs. THANKYOU....

all lines include tabs in the following position:-
BillyW 7 <tab>29/2 <tab>STH <tab>2:44 <tab>Dave Hollinghurst 1 <tab>28/3 <tab>BAM <tab>3:18

file example:
BillyW 7 29/2 STH 2:44 Dave Hollinghurst 1 28/3 BAM 3:18
Adrian Bassett 47 42/6 ISI 11:18 SusanH 14 204/10 PRE 7:35
Sandra Silvera 4 16/1 DUN 2:40 Carol Barton 6 33/4 WLD 3:50

required output:
BillyW 7 29/2 STH 2:44
Dave Hollinghurst 1 28/3 BAM 3:18
Adrian Bassett 47 42/6 ISI 11:18
SusanH 14 204/10 PRE 7:35
Sandra Silvera 4 16/1 DUN 2:40
Carol Barton 6 33/4 WLD 3:50
 
brilliant unixosadmin, it works !!!!

thankyou for taking time to answer my question :)

regards
pneumatic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top