I have this file with 20k+ IPs inside:

```
104.20.15.220,104.20.61.219,104.20.62.219,104.20.73.221,104.20.74.221,104.20.14.220
104.20.15.220,104.20.73.221,104.20.74.221,104.25.195.107,104.25.196.107,104.20.14.220
91.215.154.209
...

```

The question is how to split in into single IPs on each string:

```
104.20.15.220
104.20.61.219

```
['https://Stackoverflow.com/questions/39528273', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5311904/']
Just replace a comma with a new line with either of these commands:

```
tr ',' '\n' < file

sed 's/,/\n/g' file

perl 's/,/\n/g' file

awk 'gsub(/,/,"\n")' file

```

... or match every block of text up to a comma or the end of line:

```
grep -oP '.*?(?=,|$)' file

```

... or loop through the fields and print them:

```
awk -F, '{for(i=1;i<=NF;i++) print $i}' file

```

... or set the record separator to the comma and let `awk` do all the work:

```
awk -v RS=, '1' file
awk 1 RS=, file

```

... or match the IPs, you can use the regex from [Matching IPv4 Addresses](https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html):

```
grep -oE '((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)' file

```

---

They all return:

```
104.20.15.220
104.20.61.219
104.20.62.219
104.20.73.221
...

```
This will transform all the commands into newline. 

```
tr ',' '\n' <filename

```

or 

```
awk 'BEGIN{FS=",";OFS="\n"}{$1=$1}1' filename

```