|
|
|
|
|
by guruparan18
1671 days ago
|
|
I am confused how this works. I would assume `SECONDS` would just be a shell variable and it was first assigned `0` and then it should stay same, why did it keep counting the seconds? > SECONDS
bash: SECONDS: command not found
> SECONDS=0; sleep 5; echo $SECONDS;
5
> echo "Your command completed after $SECONDS seconds";
Your command completed after 41 seconds
> echo "Your command completed after $SECONDS seconds";
Your command completed after 51 seconds
> echo "Your command completed after $SECONDS seconds";
Your command completed after 53 seconds
|
|
https://www.oreilly.com/library/view/shell-scripting-expert/...