rsp/scripts


Random shell scripts for different tasks

Host: GitHub

License: MIT

Language: Shell


scripts

https://github.com/rsp/scripts

Random shell scripts for different tasks. Mostly for Linux.

Work in progress - more to come.

Some of those scripts were written for my answers on Stack Exchange:

Functions

ok-functions

Usage:

sn1
sn2
sn3
ok
oks

For example to hear when a long-running command finishes and to hear a different sound on success and on failure:

Example with success:

ls / && ls /bin && ls /usr; oks

example with error:

ls / && ls /bim && ls /usr; oks

See ok-functions.md for more info.

Scripts

auu

Usage: sudo auu

Source: https://rawgit.com/rsp/scripts/master/auu

Update and upgrade a Debian, Ubuntu or other APT-based Linux system.

See auu.md for more info.

internalip

Usage: internalip [TARGET]

Source: https://rawgit.com/rsp/scripts/master/internalip

Get internal IP address used for outgoing Internet connections.

TARGET is an IP address, 8.8.8.8 by default, or a host name (if gethostip or getent are available on the system).

See internalip.md for more info.

externalip

Usage: externalip [METHOD]

Source: https://rawgit.com/rsp/scripts/master/externalip

Get external IP address that is visible by servers that you connect to over Internet.

METHOD can be: dns (default), http, https, ftp, telnet.

See externalip.md for more info.

externalip-benchmark

Usage: externalip-benchmark

Source: https://rawgit.com/rsp/scripts/master/externalip-benchmark

Find what services providing external IP address via http and https are the fastest.

See externalip-benchmark.md for more info.

Installation

Most of those scripts should be stand-alone and can be copied in any place.

My recommendation is to make a ~/bin or ~/scripts directory:

mkdir ~/bin

and put this in your ~/.bashrc or ~/.profile:

[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"

That way it's easy to put any script there:

cd ~/bin
wget https://rawgit.com/rsp/scripts/master/example
less example # see what was downloaded
chmod a+x example

And use it at will. Of course always see what was downloaded first.

Author

Rafał Pocztarski - https://github.com/rsp

License

MIT License (Expat). See LICENSE.md for details.

Project Statistics

Sourcerank 5
Repository Size 38.1 KB
Stars 64
Forks 10
Watchers 3
Open issues 1
Dependencies 0
Contributors 1
Tags 0
Created
Last updated
Last pushed

Top Contributors See all

Rafał Pocztarski

Something wrong with this page? Make a suggestion

Last synced: 2017-11-24 19:54:39 UTC

Login to resync this repository