I have looked at many questions at StackOverflow and uncle Google, but somehow I still can't crack it.
I have a CSV file that is automatically exported by SSRS. Unfortunately the export plugins are old and they put two line breaks and carriage returns at the end of the file:
00000c0: 6b7c 3230 2d46 6562 2d31 360d 0a0d 0a k|20-Feb-16....
I tried many sed
replacements however it seems to only remove one line.
For example the simplistic
sed -i '/^\s*$/d'
Also tried to replace \s
with [[:space:]]
(also works but on one line only)
After which the last line of the hex dump looks like below:
00000c0: 6b7c 3230 2d46 6562 2d31 360d 0a k|20-Feb-16..
I've tried things like:
sed -i 's/\x0D\X0A//g' <file>
however this wouldn't replace both 0d0a at the end
Any help would be appreciated