2023-07-05 11:33:45 +02:00
|
|
|
# Pausing a script (like MSDOS pause command)
|
|
|
|
|
2024-04-01 06:10:32 +02:00
|
|
|
---- dataentry snipplet ---- snipplet_tags: terminal, pause, input
|
2023-07-05 11:33:45 +02:00
|
|
|
LastUpdate_dt: 2010-07-31 Contributors: Jan Schampera type: snipplet
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
|
|
From the [example section of the read
|
2024-01-29 02:01:50 +01:00
|
|
|
command](../commands/builtin/read.md#examples), something that acts similar
|
2023-07-05 11:33:45 +02:00
|
|
|
to the MSDOS `pause` command:
|
|
|
|
|
|
|
|
pause() {
|
|
|
|
local dummy
|
|
|
|
read -s -r -p "Press any key to continue..." -n 1 dummy
|
|
|
|
}
|