So simple a bash script which contains only two lines.
cat show.sh
systemctl status cron
exit 0
Executed it with root in terminal.
bash show.sh
All info about cron.service show on terminal.
cron.service - Regular background program processing daemon
Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: ena
Active: active (running) since Sat 2019-08-10 06:51:18 EDT; 13h ago
Docs: man:cron(8)
Why the show.sh is not in exit status,to add a click on q
will exit show.sh,why exit 0
not execute?how to trigger it?
My expection:show info about cron.service on terminal and exit show.sh script.
Half done for my show.sh,just show info about cron.service on terminal.
It is meaningful that a long script automate a job ,the above two lines is the last step to show the whole script's status.