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 520B

12345678910111213141516171819202122232425262728293031
  1. #/bin/sh
  2. help() {
  3. echo "Syntaxe"
  4. echo "‾‾‾‾‾‾‾"
  5. echo "sh $0 [ adresse ] [ tablename ] [ id ]\n"
  6. }
  7. if [ "$1" ]
  8. then
  9. address=$1
  10. fi
  11. if [ "$2" ]
  12. then
  13. tablename=$2
  14. fi
  15. if [ "$3" ]
  16. then
  17. id=$3
  18. fi
  19. . ./config.sh
  20. . ./dep/address.sh
  21. . ./dep/tablename.sh
  22. . ./dep/id.sh
  23. . ./tools/title.sh
  24. echo "Get id $id of table $tablename"
  25. result=`curl --header "Content-Type: application/json" -b cookie.txt $address/api.php/records/$tablename/$id 2> /dev/null`
  26. sh tools/show_result.sh $result
  27. echo "\n"