Date and time of execution of a program
Sophia Terry
How can date and time of execution of a program be loaded at middle of a program. Every time I use exec date command it seems to ignore everything beneath it.
31 Answer
From help exec:
exec: exec [-cl] [-a name] [command [arguments ...]] [redirection ...] Replace the shell with the given command.You don't want to replace the current shell (which will prevent script execution from reaching any subsequent commands): just use date
echo "HELLO"
date
echo "HI"