Pausing a bash script

I recently wanted to have a bash script file stop at the end of the command sequence so that I could check which disk directory was then active. There are at least two ways to achieve this.

(1) Use an echo – read command sequence

echo “Shell command complete”

(2) Use the read command with a p(rompt) switch

read -p “Shell command complete”


read – Read a line from standard input

How do I prompt for input in a Linux shell script?

This entry was posted in Bash script. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s