12345678910111213141516171819202122232425262728293031 |
- #/bin/sh
-
- help() {
- echo "Syntaxe"
- echo "‾‾‾‾‾‾‾"
- echo "sh $0 [ adresse ] [ tablename ] [ id ]\n"
- }
-
- if [ -z "$1" ]
- then
- echo "Missing parameters : web adresses is needed\n"
- help
- exit
- fi
- if [ -z "$2" ]
- then
- echo "Missing parameters : tablename is needed\n"
- help
- exit
- fi
- if [ -z "$3" ]
- then
- echo "Missing parameters : an id is needed\n"
- help
- exit
- fi
-
- echo "Get id $3 of table $2"
- echo "$1 $2 $3"
- curl --header "Content-Type: application/json" -b cookie.txt $1/api.php/records/$2/$3
- echo "\n"
|