i'm trying to add a new line with data from a file to another file. The problem is, the data in the source file is with whitespaces so i do not get everything included.
Here's my code:
Source File: token
cat token Token = [223, 146, 134, 157, 244, 212, 236, 171]
My Merge File: preconfig.ini
... EnableDebugConsole = false AllowStreamPush = false UploadLimit = 83886080 RunAsUser = 0 RunAsGroup = 0 ...
Target File is the config.ini with the added token. I use sed:
for i in $(cat token); do (sed -e '/EnableDebugConsole/a\' -e $i preconfig.ini > config.ini); done
After this my config.ini look like this:
... EnableDebugConsole = false 171] AllowStreamPush = false UploadLimit = 83886080 RunAsUser = 0 RunAsGroup = 0 ...
So the problem seems to be with the wihitespaces? I had tryed with "$i" but the result stays the same. Any ideas?