简体   繁体   中英

bash script for systemctl list-units --type service on Centos

I have a bash script with the following line: systemctl list-units --type service, and my script is stuck and and I want to run on without pressing the space key. How can i proceed to have the same output for the command without pressing the space key? Basically the script must to move one without asking me to press the space bar. Please help me....

Add --no-pager to systemctl if you do not wish to see the pager:

systemctl --no-pager list-units --type service

or alternatively redirect the output to something that is not a terminal.

systemctl list-units --type service | cat

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM