Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community that shares solutions with each other.

If you think you have something to add here.

you are welcome with your fresh ideas - List Articles

Bash - shell sh script with do not close terminal which works like windows bat pause

0 contributions
7 points

Bash - shell sh script with pause

We can use linux read command to pause bash script.

read

Working example:

#!/bin/sh

# print to console
echo 'Hello World'

echo 'Will wait until user press Enter'

# will wait until user press Enter
read

Filename: 

pause_bash_sh_script.sh
Bash - shell sh script with do not close terminal which works like windows bat pause
Bash - shell sh script with pause

NOTE about linux read command

read - Read a line from the standard input and split it into fields.

References

  1. Linux read command - manual page
  2. Read command wikipedia
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more