Question: Create the following scripts and test them out. hello 2 . sh: # ! / bin / bash name = Ali echo Hello $name, have

Create the following scripts and test them out.
hello2.sh:
#!/bin/bash
name="Ali"
echo "Hello $name, have a nice day!"
hello3.sh:
#!/bin/bash
echo "Who is there?"
read name
echo "Hello $name, have a nice day!"
hello4.sh:
#!/bin/bash
echo "Hello $1, have a nice day!"
Test with one command-line argument, for example:
./hello4.sh Ali
hello5.sh:
#!/bin/bash
today=$(date)
echo "Hello, the date and time is $today."
echo "The date is $(date -I)."

Step by Step Solution

3.43 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here are the scripts hello2sh bash binbash nameAli ec... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!