Skip to content

Instantly share code, notes, and snippets.

@lancelakey
Created September 12, 2009 01:08
Show Gist options
  • Save lancelakey/185685 to your computer and use it in GitHub Desktop.
Save lancelakey/185685 to your computer and use it in GitHub Desktop.
ssed -i 's/ / | /g' 1| ssed -i 's/^/| /' 1| ssed -i 's/$/ |/' 1
File 1 (Before):
VLAN Name Subnet
1 Default 10.1.1.0/24
10 Ten 10.1.10.0/24
20 Twenty 10.1.20.0/24
30 Thirty 10.1.30.0/24
40 Fourty 10.1.40.0/24
50 Fifty 10.1.50.0/24
File 1 (After):
| VLAN | Name | Subnet |
| 1 | Default | 10.1.1.0/24 |
| 10 | Ten | 10.1.10.0/24 |
| 20 | Twenty | 10.1.20.0/24 |
| 30 | Thirty | 10.1.30.0/24 |
| 40 | Fourty | 10.1.40.0/24 |
| 50 | Fifty | 10.1.50.0/24 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment