jeudi 26 mars 2015

Combine lines of file to string [on hold]


I am trying to have a file inputted by my script and put into a string to be put into another file.



./script.sh -u uuids.txt -s servers.txt


Each file will have a list with each value being on it's own line and where each line on each file belong together each time the string is made.



user:UUID:*:SERVER


That is an example of the string with the variables put into it.


I have the getops part right and I am able to print out the file contents correctly. I am asking for a way to add the lines one by one to the string to be added to a new line in another file.


I was thinking having awk split the lines within a loop that runs how ever many times for the lines in the files this would then save the overall string (pictured above) to a new line of a file with the >>.



1 commentaire: