how can I assign the output of the below command to a variable in a while loop?
echo $(( `date +%s` - `stat -L --format %Y $"/root/path/$output_file"` ))
This command checks the age of the file in a path, echo works successfully, but when I want to assign it to a variable, it give "command not found" error or may be I do not know how to assign the value of it to a variable properly.