This command is where i need to insert into a file “success! Wed Jun 8 20:28:01 WAST 2022”,i.e. current timestamp. But it keeps writing ‘success date’ Answer You could use command substitution for this. That would be in shell or bash, the same. Additionally, you may need to escape the dollar sign, since $() has a special meaning in Kubernetes