Skip to main content
Tweeted twitter.com/#!/StackUnix/status/583491972511490048
Title and tags
Source Link
jasonwryan
  • 74.9k
  • 35
  • 204
  • 230

turning lists Turn list into linessingle line with delimiter

I have to take a list (loads) of IP addresses in this format:

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

turning lists into lines

I have to take a list (loads) of IP addresses in this format

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

Turn list into single line with delimiter

I have to take a list (loads) of IP addresses in this format:

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

deleted 75 characters in body
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

This is probably simple to you lot but being new to Linux I have no idea.

I have to take a list (loads) of IP addresses in this format

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sedsed but I can't get it to work.

This is probably simple to you lot but being new to Linux I have no idea.

I have to take a list (loads) of IP addresses in this format

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

I have to take a list (loads) of IP addresses in this format

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

formatting
Source Link
don_crissti
  • 85.7k
  • 31
  • 234
  • 262

This is probably simple to you lot but being new to Linux I have no idea.

I have to take a list (loads) of IP addresses in this format

134.27.128.0 111.245.48.0 109.21.244.0

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

Please help

This is probably simple to you lot but being new to Linux I have no idea.

I have to take a list (loads) of IP addresses in this format

134.27.128.0 111.245.48.0 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

Please help

This is probably simple to you lot but being new to Linux I have no idea.

I have to take a list (loads) of IP addresses in this format

 134.27.128.0
 111.245.48.0
 109.21.244.0

and turn them into this format with a pipe in-between (IPs made up)

134.27.128.0 | 111.245.48.0 | 109.21.244.0 | 103.22.200.0/22

I think it is a find and replace command like sed but I can't get it to work.

Source Link
Loading