paste_holen.sh aktualisiert
This commit is contained in:
@ -1,11 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
PASTE_ID="$1" # Aufruf: ./paste_holen.sh abc123
|
PASTE_ID="$1"
|
||||||
|
HOST="${2:-http://100.87.87.103:8184}"
|
||||||
|
|
||||||
if [ -z "$PASTE_ID" ]; then
|
if [ -z "$PASTE_ID" ]; then
|
||||||
echo "Verwendung: $0 <paste-id>"
|
echo "Verwendung: $0 <paste-id> [host]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl -s "https://pastebin.com/raw/$PASTE_ID"
|
curl -s "$HOST/api/v1/paste/$PASTE_ID" | \
|
||||||
|
python3 -c 'import json,sys; print(json.loads(sys.stdin.read())["files"][0]["content"])'
|
||||||
Reference in New Issue
Block a user