Article 6MTK4 [Bash]declare -i error message

[Bash]declare -i error message

by
gerard4143
from LinuxQuestions.org on (#6MTK4)
Code:#! /usr/bin/env bash
set -euo pipefail

declare -i num1=0

read -r -p 'Enter first number: ' num1

echo "You entered: ${num1}"How can I display a message(better than the default) when the user enters a non-integer value for num1?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments