Quantcast
Channel: FedoraForum.org
Viewing all articles
Browse latest Browse all 35970

A bash script problem

$
0
0
Hi,

I have a problem with a bash script when I try to get the value of a variable. This is part of code.

Code:

export NUM_BASH_PARAMETROS=2
export FICHERO1_BASH=~/.bashrc
export FICHERO2_BASH=~/.bash_profile
export ETIQUETA="BASH"
export c=1

export VAR1="FICHERO`echo $c`_`echo $ETIQUETA`"


With this code in VAR1 I have

Code:

echo $VAR1
FICHERO1_BASH

but I want to get the value in FICHERO1_BASH. In this case "~/.bashrc".

Can anybody help me?


Thanks

Viewing all articles
Browse latest Browse all 35970

Trending Articles