Skip to main content
added 20 characters in body
Source Link
muru
  • 77.9k
  • 16
  • 212
  • 318
FICH10=primero.sh
FICH20=segundo.sh

for i in 10 20
do
   echo $FICH($i)  # I want resolved first $i and then resolver var FICH10
done

I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop

I don't solved with the response asocciate

$ for i in 10 20

do echo $((FICH$i)) done ksh: line 3: primero: parameter not set

$ for i in 10 20
> do
> echo $((FICH$i))
> done
ksh: line 3: primero: parameter not set
FICH10=primero.sh
FICH20=segundo.sh

for i in 10 20
do
   echo $FICH($i)  # I want resolved first $i and then resolver var FICH10
done

I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop

I don't solved with the response asocciate

$ for i in 10 20

do echo $((FICH$i)) done ksh: line 3: primero: parameter not set

FICH10=primero.sh
FICH20=segundo.sh

for i in 10 20
do
   echo $FICH($i)  # I want resolved first $i and then resolver var FICH10
done

I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop

I don't solved with the response asocciate

$ for i in 10 20
> do
> echo $((FICH$i))
> done
ksh: line 3: primero: parameter not set
This isn’t bash, it’s ksh.
Link
Stephen Kitt
  • 481.4k
  • 60
  • 1.2k
  • 1.4k
added 143 characters in body
Source Link
FICH10=primero.sh
FICH20=segundo.sh

for i in 10 20
do
   echo $FICH($i)  # I want resolved first $i and then resolver var FICH10
done

I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop

I don't solved with the response asocciate

$ for i in 10 20

do echo $((FICH$i)) done ksh: line 3: primero: parameter not set

FICH10=primero.sh
FICH20=segundo.sh

for i in 10 20
do
   echo $FICH($i)  # I want resolved first $i and then resolver var FICH10
done

I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop

FICH10=primero.sh
FICH20=segundo.sh

for i in 10 20
do
   echo $FICH($i)  # I want resolved first $i and then resolver var FICH10
done

I want it to first solve $i and concatenate it to the FICH shoreline and thus return the value of $FICH10 or $FICH20 but without having to put the numbers, but they are resolved by the loop

I don't solved with the response asocciate

$ for i in 10 20

do echo $((FICH$i)) done ksh: line 3: primero: parameter not set

Post Closed as "Duplicate" by muru bash
Formatting
Source Link
choroba
  • 49.4k
  • 7
  • 92
  • 118
Loading
Source Link
Loading