Dear All,
this script was working well enough few days back. Now it started acting up.
Could anyone please throw some lights about what may be the reason for it's not working.
ts=$( printf "%(%s)T" "now" )
under debug mode this is what I get
printf "%(%s)T" "now"
++ printf '%(%s)T' now
test.sh: line 2: printf: `(': invalid format character
+ ts=
my OS is
x86_64 GNU/Linux
and shell is
/bin/ksh93
However more strange thing is if I'm running same line on the command prompt not thru any shell script then this same line works like charm.
> ts=$( printf "%(%s)T" "now" )
> echo $ts
1395415413