123456789101112131415161718192021222324 |
- #/bin/sh
-
- help() {
- echo "Syntaxe"
- echo "‾‾‾‾‾‾‾"
- echo "sh $0 [ adresse ] [ username ] [ password ]\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
- echo "Login as $2 in cookie.txt"
- echo "$1 $2 $3"
- curl --header "Content-Type: application/json" -b cookie.txt $1/api.php/records/$2
- echo "\n"
|