12345678910111213141516171819202122232425262728293031 |
- #/bin/sh
-
- help() {
- echo "Syntaxe"
- echo "‾‾‾‾‾‾‾"
- echo "sh $0 [ adresse ] [ tablename ] [ id ]\n"
- }
-
- if [ "$1" ]
- then
- address=$1
- fi
- if [ "$2" ]
- then
- tablename=$2
- fi
- if [ "$3" ]
- then
- id=$3
- fi
-
- . ./config.sh
- . ./dep/address.sh
- . ./dep/tablename.sh
- . ./dep/id.sh
-
- . ./tools/title.sh
- echo "Get id $id of table $tablename"
- result=`curl --header "Content-Type: application/json" -b cookie.txt $address/api.php/records/$tablename/$id 2> /dev/null`
- sh tools/show_result.sh $result
- echo "\n"
|