Hi, I have created a lookup table in excel, I then save it as CSV UTF-8, I then import it into Linux (Ubuntu) where the file type is “CSV text”. See below for the CSV file in linux:
Hi @gsmith, you are a legend for this reply! This really helped and pointed me in the right direction, although did not quite resolve the issue.
It turns out it is the separators and quote characters when importing the file from Windows are not recognised by Linux despite them looking the same.
I have tried things such as:
sed -i 's/"/$/g; s/,/;/g' *file.csv*
To replace the quote/separator characters with what I thought would be recognised characters, then changing the quote/separator characters in the data adapters to $ and ; and then rebooting the server, but this does not work either.
Non-ideal Resolution:
The only way I can get it to work is by deleting and replacing each quote/separator character manually (using nano), however as we have many thousands of IP addresses I would really rather not have to do this.
Resolution
Yay! I got it working. This is what I did:
I imported the file without quotes and added them in Linux with the following command, also the input file has carriage returns at the end of the lines, this command also removes them.
sed -i 's/\(.*\)\r/"\1"/g;s/,/","/g'
Then for some reason, which I still don’t understand, I had to completely remove the “key”,“value” line (first line) from the imported file and type it out manually (without editing any of the other lines).
I’m very happy, this has been bugging me for the last two days. I hope this helps someone else in the future.