Wgetpaste

is Article description::a command-line tool for easily posting snippets of text to various online "pastebin" services. It should be very useful for providing information to help with troubleshooting, for posting to IRC or to the forums, for example.

USE flags
currently has just one use flag, for using SSL/TLS or not:

Emerge
Install :

Configuration
Settings, notably the default service, can be configured globally in or in, or per-user in  or in.

There is an example configuration file available.

Github gists
The gists service requires a valid API token. Generate it on the Github website and paste it into a config snippet:

A gist must be set to public or private by setting the variable either in the config file, or on the command-line, thus (for Bash):

must be set to  or   only or it will report an error!

Invocation
Invoke with the   option for useful information on usage:

Service selection
Before posting a snippet, care should be taken to select the desired service to post to.

To show which is the current default service, and list available services, use the  (  for short) option:

The default service is marked with an asterisk, this service will be used unless a different service is selected with the  (  for short) option, when pasting. For example:

Different paste services have different constraints, such as allowable size, retention period etc. Go to the service website for full information. For larger posts, 0x0 may be useful.

Posting a file
To post a file, simply run followed by the filename, not forgetting to specify a paste service if somthing other than the default is required.

For example, run the following command to create a paste of the system's Xorg configuration:

To create a paste of using the tiny URL service use the   option (  for short):

Post command output
A command's output may be directly posted to a snippet service, though it is recommended to write output to a file and check the contents before pasting, to avoid any possible security issues.

To paste the entire output of a command, use the  (  for short) option. Remember to quote the command:

Content may also be piped to, though this may omit stderr, so "2>&1" can be used, for example.

Advanced options
To set a language for syntax highlighting use the  (  for short) option:

Use the  (  for short) option to list all available languages, these depend on the selected paste service:

External references

 * There is a similar tool available in Portage :.
 * Pastebin - Wikipedia article about pastebin services.