Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 922  / 3 Years ago, tue, june 1, 2021, 7:26:18
#!bin/bash
NAME[0]="KANNA"
echo "first name: ${NAME[0]}"


The above script is executed with bash filename but not with sh filename


More From » scripts

 Answers
0

Array is not supported in bourne shell (sh). For more information about this check this question on stack overflow. For more information about array in bash check following links




  1. TLDP

  2. GNU


[#24596] Thursday, June 3, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
torlim

Total Points: 408
Total Questions: 113
Total Answers: 110

Location: Estonia
Member since Wed, May 27, 2020
4 Years ago
;