[DiscordArchive] I mean do you think I can improve the hole code more?
[DiscordArchive] I mean do you think I can improve the hole code more?
Archived author: Tanados • Posted: 2022-05-22T07:38:17.069000+00:00
Original source
I mean do you think I can improve the hole code more?
Archived author: Revision • Posted: 2022-05-22T15:58:18.283000+00:00
Original source
Try creating a bash script with the following code
```
#!/bin/bash
[ -z $1 ] && time=300 || time=$1
[ $time -gt 60 ] && timetext="$((time / 60)) minutes" || timetext="1 minute"
echo "Time: $time"
echo "Timetext: $timetext"
```
If you run `./script.sh` (or whatever you name it), it'll default to 300 seconds, if you run `./script.sh 900` for example it'll use 900 seconds instead. That was my point, to make it easier to change the time. The echos are there to show what it does.