Afficher un message
Vieux 30/10/2007, 22h48   #1
mostro713@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Sed reqular expression question.

Hi.

I have a list of IP addresses (one per line) in a text file. I need
to surround them with pipe symbols and include a single space in
between the first and last number.

For example:

[before]
192.168.1.1
<space>
192.168.1.2
192.168.1.3
<space>
192.168.1.4
192.168.1.5

[after]
| 192.168.1.1 |
| 192.168.1.2 |
| 192.168.1.3 |
| 192.168.1.4 |
| 192.168.1.5 |

I tried a few different sed line that didn't work out so well

Thanks in advance....

  Réponse avec citation
 
Page generated in 0,05509 seconds with 9 queries