Horje
bash ask for input Code Example
shell promt user input
#!/bin/bash

read -p "Enter Your Name: "  username
echo "Welcome $username!"
Source: tecadmin.net
bash ask for input
#!/bin/bash
# Demonstrate how read actually works
echo What cars do you like?
read car1 car2 car3
echo Your first car was: $car1
echo Your second car was: $car2
echo Your third car was: $car3
input bash
# fullname="USER INPUT"
read -p "Enter fullname: " fullname
# user="USER INPUT"
read -p "Enter user: " user
bash get user input
#!/bin/bash
### Simple bash script to ask a user for their name
# First, echo the question
echo Hello, what is your name?
# Next, get the user input
read varname
# Finally, echo the response using the users input that we got in the previous step
echo It\'s nice to meet you $varname




Shell

Related
linux setup pass gpg key Code Example linux setup pass gpg key Code Example
brew install notion Code Example brew install notion Code Example
how to warp files in linux Code Example how to warp files in linux Code Example
how to delete a word from a file  in bash Code Example how to delete a word from a file in bash Code Example
setxkbmap toggle Code Example setxkbmap toggle Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
16