Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to put a text in a variable

Status
Not open for further replies.

ameramer

Technical User
May 15, 2003
2
FR
Hello,

I would like to put a text of characters in a variable in order to call it later. For example i would like to do:

If [ $x == 5 ] then (put "hello" in variable $x1)
fi

echo "$x1"

Could you please tell me what the syntax for it.

Thanks in advance,




 
Hi,

#!/usr/bin/ksh
x5=5
if [[ $x5 -eq 5 ]]
then
x1="what do you want"
fi
echo $x1

regards Boris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top