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

print firts column an last column 2

Status
Not open for further replies.

rossyeperez

Technical User
Feb 1, 2007
15
MX

Hello all

If I have a file with this kind of columns

aaaa aaaa aaaa xxx
bbbb bbbb www
cccc cccc ccccc cccc yyy

I would like to print the firts column.last column and the information in the midle of first and the las column prin after these .. like the example:


aaaa.xxx aaaa aaaa
bbbb.www bbbb
cccc.yyy cccc ccccc cccc


thanks


 
Typed, untested:
awk '{$1=$1"."$NF;$NF="";print}' /path/to/input > output

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top