What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-16 05:16:03
bash script in array
if [[ " ${array[@]} " =~ " ${value} " ]]; then # whatever you want to do when array contains value fi if [[ ! " ${array[@]} " =~ " ${value} " ]]; then # whatever you want to do when array doesn't contain va... Add solution -
Shell/Bash 2021-09-13 22:55:03
get last element in an array bash
echo "${array[@]: -1:1}" Add solution -
Shell/Bash 2021-08-30 11:13:02
bash display items in array
$ printf '%s\n' "${my_array[@]}" Add solution -
Shell/Bash 2021-08-30 01:37:02
bash print array
$ printf '%s\n' "${my_array[@]}" Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5