A Personalized Echo – HackerRank Solution

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

So, without further ado, let’s begin this tutorial.

Task

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

Solution – 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 CodingBroz. This tutorial is only for Learning and Educational purpose.

Leave a Comment

Your email address will not be published. Required fields are marked *