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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print all but last column

Status
Not open for further replies.

ogniemi

Technical User
Nov 7, 2003
1,041
PL
delimeter is "."
number of columns is varied.

eg.

2424.24243.242432.432432
345.34.3453.345435.3
234.243243234.24324.243453.3333

I need output:

2424.24243.242432
345.34.3453.345435
234.243243234.24324.243453


(in each line removed all starting from last ".")

thx!!
 
easy:

[tt]awk 'BEGIN{FS=OFS="."}{$NF=""; NF--; print}'[/tt]



HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top