-2

I want to make my script user interactive. On running the script (./versionControl.sh) the first thing that should appear on the screen is

Please enter the package name::

When the user enters the package name it should take that package name as input and do further operations

How can i achieve this? Kindly help

lurker
  • 56,987
  • 9
  • 69
  • 103
  • 1
    Have you tried anything? –  Feb 20 '14 at 21:00
  • 1
    possible duplicate of [How do I prompt for input in a Linux shell script?](http://stackoverflow.com/questions/226703/how-do-i-prompt-for-input-in-a-linux-shell-script) – lurker Feb 20 '14 at 21:00

1 Answers1

2

You'll want to use the BASH read command, like so:

echo "Enter your name, followed by [ENTER]:"
read name
echo $name

Check here for more info: read user input

binaryatrocity
  • 956
  • 5
  • 10