November 18th, 2013, 03:14 AM
I want to get a string in Shell script with the below format.
10-03-2013 is current date.
6h16m18s is current time.
log ,QA and & are static
I need the full information in string in a shell script file .
I am a new to unix and can anybody help on this.
November 18th, 2013, 06:47 AM
MyVar="log-$(date %+F)_&_$(date %+H+M+S)_QA.out"
The date command for the time needs 'padding' to insert the h, m and s literals, but I'm not at a *nix command lien at the moment so cannot check.
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc