I have a directory of over a hundred text files that I'm getting ready to merge with the CAT command. However there is only one space after each file; this makes the output look crowded.
I would like to add two, possibly even four carriage returns at the end of each text file to make the final product a bit more readable.
I checked out another thread about this but the solution didn't work for me; I got a "bash: *.txt: ambiguous redirect"
Yes I had a cloudy moment where I didn't get that error message but I ate lunch with my son and came back to the problem and it made a whole lot more sense.
So I then tried a couple of other options where I specified the output but can't quite get the line carriage solution.
Thanks for any help you might give.
~ ~
P.S. If you are interested in which thread I was looking at, search this forum for "add-carriage-return-end-file". It'll come up as the first post (sorry the system doesn't allow me to post links yet)
---------- Post updated at 07:58 PM ---------- Previous update was at 03:28 PM ----------
Ok never mind ... Hope this helps someone else but I managed to dig around and try many many different variances until one worked. This is what did it for me.
Let me know if you can think of any improvements or anything that I'm overlooking.
sed -i '$ s/$/ \r\r/' *