I'm trying to do loop to write files, I need to know how to load a file as cities.txt, this content inside looks like:
Los Angeles
San Francisco
St. Louis
New York
Philadelphia
Miami
Houston
Dallas
Kansas City
Memphis
...
This list includes new line, I'm looking a script to do loop, the output would be like this screenshot:
Also the space string needs to be replaced from " " to "-" to prevent error due to naming file rules.