A Personalized Echo HackerRank Solution

Hello coders, In this post, you will learn how to solve the A Personalized Echo HackerRank Solution. This problem is a part of the Linux Shell series.

A Personalized Echo HackerRank Solution

Problem

Write a Bash script which accepts name  as input and displays the greeting “Welcome (name)

Input Format

There is one line of text, name.

Output Format

One line: “Welcome (name)” (quotation marks excluded).
The evaluation will be case-sensitive.

Sample Input 0

Dan

Sample Output 0

Welcome Dan

Sample Input 1

Prashant

Sample Output 1

Welcome Prashant

A Personalized Echo HackerRank Solution

#!/bin/bash
read name
echo "Welcome $name"

Note: This problem (A Personalized Echo) is generated by HackerRank but the solution is provided by chase2learn. This tutorial is only for Learning and Educational purpose.

Leave a Comment