I run login and then run script.
For this I would use echo value to a file.
If you want to automate it in some capacity you could also add this to a cron job.
[Expert@Amir:0]# echo $(uptime) >> test.csv
[Expert@Amir:0]# echo $(uptime) >> test.csv
[Expert@Amir:0]# echo $(uptime) >> test.csv
[Expert@Amir:0]# echo $(uptime) >> test.csv
[Expert@Amir:0]# echo $(uptime) >> test.csv
[Expert@Amir:0]# cat test.csv
08:56:40 up 16:58, 1 user, load average: 0.08, 0.08, 0.05
08:56:41 up 16:58, 1 user, load average: 0.08, 0.08, 0.05
08:56:41 up 16:58, 1 user, load average: 0.08, 0.08, 0.05
08:56:42 up 16:58, 1 user, load average: 0.08, 0.08, 0.05
08:56:42 up 16:58, 1 user, load average: 0.08, 0.08, 0.05
Kind regards, Amir Senn