[HowTo] Download from https://paste.debian.net with a bash script

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
Aki
Global Moderator
Global Moderator
Posts: 3949
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 109 times
Been thanked: 518 times

[HowTo] Download from https://paste.debian.net with a bash script

#1 Post by Aki »

Hello,

You can download a known paste/post from https://paste.debian.net/ with the following command (the wget or curl package must be installed):

Code: Select all

PASTE_ID="1298072" sh -c 'wget -O "downloaded_paste_$PASTE_ID.txt" "https://paste.debian.net/plain/$PASTE_ID"'
or

Code: Select all

PASTE_ID="1298072" sh -c 'curl -o "downloaded_paste_$PASTE_ID.txt" "https://paste.debian.net/plain/$PASTE_ID"'
where "1298072" is the ID of a persistent paste used here as example.

See https://github.com/formorer/paste.pl/blob/master/apache-config#L11 for https://forums.debian.net URL rewrite rules.

EDIT:
For your convenience, instructions on how to upload to https://paste.debian.net/ can be found here:
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply