How can I assign a variable to an variable. IE $car=honda
One way I can do it is export $car=honda
or
let $car=2323
Is there any other ways to preform this task
How can I assign a variable to an variable. IE $car=honda
One way I can do it is export $car=honda
or
let $car=2323
Is there any other ways to preform this task
The answer depend on your shell
For sh/bash/ksh
car=honda
new_car=$car
echo $new_car
honda
for csh/tcsh
set car = honda
set new_car = $car
echo $new_car
My question was asking how to set a variable to another variable
like
car=honda
export ${car}=blue
echo $honda
blue
#!/bin/bash
car=honda
declare $car=blue
echo $honda
blue
Please take the time to learn how to use [code] tags when posting code or data on forum.