Search Results

Search: Posts Made By: lingjing
1,977
Posted By lingjing
Thanks ! after add the declaration declare -A...
Thanks ! after add the declaration
declare -A array

It works as expected : The undefined item of array has empty value.
1,977
Posted By lingjing
Bash shell script undefined array item value question
Hello,

I'm new here. I test these expressions's value in my script :
(in centOS 6 )
#!/bin/bash
array['test']='something'

echo "############"
echo ${array["test1"]}
echo ${array["test2"]}...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy