api de gestion de ticket, basé sur php-crud-api. Le but est de décorrélé les outils de gestion des données, afin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

get_line.sh 552B

12345678910111213141516171819202122232425262728293031
  1. #/bin/sh
  2. help() {
  3. echo "Syntaxe"
  4. echo "‾‾‾‾‾‾‾"
  5. echo "sh $0 [ adresse ] [ tablename ] [ id ]\n"
  6. }
  7. if [ -z "$1" ]
  8. then
  9. echo "Missing parameters : web adresses is needed\n"
  10. help
  11. exit
  12. fi
  13. if [ -z "$2" ]
  14. then
  15. echo "Missing parameters : tablename is needed\n"
  16. help
  17. exit
  18. fi
  19. if [ -z "$3" ]
  20. then
  21. echo "Missing parameters : an id is needed\n"
  22. help
  23. exit
  24. fi
  25. echo "Get id $3 of table $2"
  26. echo "$1 $2 $3"
  27. curl --header "Content-Type: application/json" -b cookie.txt $1/api.php/records/$2/$3
  28. echo "\n"