I have an output like this:
(2+05:10)
(10:19)
(00:45)
This output represents day hours and minute. I would like to replace the ':' with 'd','h' and 'm' respectively, to get this
2d05h10m
10h19m
00h45m
Presently, I tried,
sed -e 's/(//g; s/)//g; s/+/:/g'|awk '{split($0,s,":"); print s[1]"d" s[2]"h"s[3]"m"}')
which gives (and here I mess up !)
6d05h20m
3d15h17m
1d02h27m
00d08hm
00d11hm
02d25hm
02d30hm
16d50hm
5d00h39m
21d48hm