initial commit
commit
aac757bade
|
|
@ -0,0 +1,17 @@
|
|||
#! /bin/bash
|
||||
|
||||
# This will parse the variable $QUERY_STRING.
|
||||
# The values will be stored in an associative array.
|
||||
# The value for a key will be stored in the array element `${param[<KEY>]}`
|
||||
|
||||
saveIFS=$IFS
|
||||
IFS='=&'
|
||||
XXQuery_string=($QUERY_STRING)
|
||||
IFS=$saveIFS
|
||||
|
||||
declare -A param
|
||||
for ((i=0; i<${#XXQuery_string[@]}; i+=2))
|
||||
do
|
||||
param[${XXQuery_string[i]}]=${XXQuery_string[i+1]}
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue