Browse Source

same as the last commit, but with an accurate script name

nas 3 years ago
parent
commit
b08e9e9de3
1 changed files with 24 additions and 0 deletions
  1. 24
    0
      test/get_table.sh

+ 24
- 0
test/get_table.sh View File

@@ -0,0 +1,24 @@
1
+#/bin/sh
2
+
3
+help() {
4
+    echo "Syntaxe"
5
+    echo "‾‾‾‾‾‾‾"
6
+    echo "sh $0 [ adresse ] [ username ] [ password ]\n"
7
+}
8
+
9
+if [ -z "$1" ]
10
+then
11
+    echo "Missing parameters : web adresses is needed\n"
12
+    help
13
+    exit
14
+fi
15
+if [ -z "$2" ]
16
+then
17
+    echo "Missing parameters : tablename is needed\n"
18
+    help
19
+    exit
20
+fi
21
+echo "Login as $2 in cookie.txt"
22
+echo "$1 $2 $3"
23
+curl --header "Content-Type: application/json" -b cookie.txt $1/api.php/records/$2
24
+echo "\n"

Loading…
Cancel
Save