How to access array value in Shell Programming?
How to access array value in Shell Programming?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
#!/bin/sh
socialmedia[0]="facebook"
socialmedia[1]="twitter"
echo "First Index: ${socialmedia[0]}"
echo "Second Index: ${socialmedia[1]}"
Output:
First Index: facebook
Second Index: twitter