Thursday, April 7, 2022

[SOLVED] How to echo from read function + extra text

Issue

I have an another issue with this script:

#!/bin/bash

read -p "Enter desired time: " desiredtime

echo "$desiredtime"

I want the echo to have the desiredtime that the user entered and 00 after it

echo "$desiredtime + 00"

so if user entered 1400 the echo should be 140000

I tried : echo "($desiredtime)00"


Solution

echo "${desiredline}00"



Answered By - Tomas Hrubovcak
Answer Checked By - Dawn Plyler (WPSolving Volunteer)