Permalink
Showing
with
3 additions
and
4 deletions.
-
+3
−4
library.bash
|
@@ -138,11 +138,10 @@ function add_object () { |
|
|
http_code=$(sed '$!d' <<<"$response") |
|
|
|
|
|
if [ "$http_code" -eq 201 ] || [ "$http_code" -eq 202 ]; then |
|
|
headers=$(sed -n '1,/^\r$/p' <<<"$response") |
|
|
|
|
|
|
|
|
# get the real Location |
|
|
location=$(grep -oP 'Location: \K.*' <<<"$headers") |
|
|
oid=$(sed 's/.*\///' <<<"$location") |
|
|
location=$(grep -oP "Location: \K.*" <<<"$response") |
|
|
oid=$(sed 's/.*\///' <<<"$location") |
|
|
|
|
|
echo "Oid created object: $oid" |
|
|
return 0 |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.