EN
Bash - shell sh script with do not close terminal which works like windows bat pause
7 points
We can use linux read command to pause bash script.
xxxxxxxxxx
1
read
Working example:
xxxxxxxxxx
1
2
3
# print to console
4
echo 'Hello World'
5
6
echo 'Will wait until user press Enter'
7
8
# will wait until user press Enter
9
read
Filename:
xxxxxxxxxx
1
pause_bash_sh_script.sh
NOTE about linux read command
read - Read a line from the standard input and split it into fields.