|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Use awk to change an IP format
Basically I am trying to run a standard output of IP address with a port number into another command but I need to change it from.
74.125.224.194.80 into 74.125.224.194:80 One command wants a period before the port the subsequent one wants a colon. So is there anyway I can feed 74.125.224.194.80 into awk and have it just substitute a : in for the 4th period it finds? I can find all kinds of ways to do global substitutions but I don't need all periods to have a : just the last one. Thanks in advance! |
| Sponsored Links | ||
|
|
#4
|
|||
|
|||
|
Awesomeness thanks! works like a charm
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk - change date format | vegasluxor | Shell Programming and Scripting | 8 | 01-25-2013 05:32 AM |
| Change a file content format using awk | fastlane3000 | Shell Programming and Scripting | 3 | 01-25-2013 01:43 AM |
| using awk or bash to change the format | yanglei_fage | Shell Programming and Scripting | 3 | 07-13-2012 10:54 PM |
| How can I change is output format by awk ? | wanchem | Shell Programming and Scripting | 8 | 05-08-2010 06:46 AM |
| awk,cut fields by change field format | jimmy_y | Shell Programming and Scripting | 7 | 11-05-2009 12:49 PM |
|
|