Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to read from keyboard in bash and store in a variable

#!/bin/bash
read -p "Enter your name : " name
echo "Hi, $name. Let us be friends!"
 
PREVIOUS NEXT
Tagged: #read #keyboard #bash #store #variable
ADD COMMENT
Topic
Name
9+7 =