Skip to main content

various useful shell utilities

Project description

phxutils

This is going to be a handy little repo where I maintain some of useful scripts that I use on a regular basis. I have a private repo where I have maintained most of these scripts for a long time, but some of them could prove useful to the general public, and half the time I forget what they do and end up re-writing them.

This repo will be a place for me to keep them up-to-date and document what they do.

Some aren't even big enough to be called scripts and are more like bash/zsh functions, but it's easier having the commands at my fingertips by having all my tools installed instead of finding/copy/pasting functions into my ~/.bashrc/~/.zshrc.

The structure includes an individual folder for each script with a README.md documenting what the script does. Additionally, there will be a bin directory where I will symlink all of the actual scripts for easy importing into your $PATH.

This project is also maintained on PyPi for easy installation via pip.

For more information, browse to the subfolders to view the individual README files.

I will continue to add scripts to this repo as I have time and as the need for them arises.

Requirements:

In order to fully-utilize all of the scripts included in phxutils, Linux is a pre-requisite, but many will work on MacOS (some may need to be tweaked a bit).

To view individual requirements, feel free to view each package's README file.

The following additional requirements are necessary:

  • /bin/sh (many scripts)
  • bash (some scripts)
  • python3 (some scripts)

Simple Installation via pip

Installation is extremely simple using pip:

Install from PyPi:

pip3 install --user phxutils

or install latest version from GitHub:

pip3 install --user git+https://github.com/phx/phxutils

For what it's worth, most of the phxutils scripts use sh and bash.

The only Python scripts at the time of this writing are Python3, and are executable with hashbangs pointing to /usr/bin/env python3 and only use the standard library.

This means, you won't clutter your native Python intallation by installing a bunch of third party libraries outside of virtual environments.

Upgrading via pip

pip3 install --upgrade --user phxutils

or

pip3 install --upgrade --user git+https://github.com/phx/phxutils

Uninstall

pip3 uninstall phxutils

Advanced Installation

To add these programs to your $PATH without using pip3, I would do something like the following:

Note: replace .bashrc with .zshrc or .bash_profile, etc., as necessary.

mkdir -p "$HOME/bin"
cd "$HOME/bin"
git clone https://github.com/phx/phxutils
echo 'PHX_UTILS="$HOME/bin/phxutils/bin"' >> ~/.bashrc
echo 'export PATH="$PHX_UTILS:$PATH"' >> ~/.bashrc
source ~/.bashrc

The benefits to this method are an easier upgrade.

Easy Upgrade via Advanced Install Method

cd "$HOME/bin/phxutils" && git pull

Uninstall

sed -i '/PHX_UTILS/d' ~/.bashrc && rm -rf "$HOME/bin/phxutils"

Note: replace .bashrc with .zshrc or .bash_profile, etc., as necessary in the above command.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phxutils-1.1.64.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phxutils-1.1.64-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file phxutils-1.1.64.tar.gz.

File metadata

  • Download URL: phxutils-1.1.64.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.20

File hashes

Hashes for phxutils-1.1.64.tar.gz
Algorithm Hash digest
SHA256 6e69da12a9d6ddec61406ee01fe4e36dd47f959f633cb4c4102e840895a6d74b
MD5 3a3a876101434e4d6ecd4fabee2eaf73
BLAKE2b-256 aac7e6cb3327a9a416c7ce723769202237133af9ef369b7bf07fb655f5fafd6d

See more details on using hashes here.

File details

Details for the file phxutils-1.1.64-py3-none-any.whl.

File metadata

  • Download URL: phxutils-1.1.64-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.20

File hashes

Hashes for phxutils-1.1.64-py3-none-any.whl
Algorithm Hash digest
SHA256 a902873671efad0feb0088512c30f6b7aa1c76af806419bb85afd95705a62a37
MD5 c480325f1406aca8c2fdb1c729650465
BLAKE2b-256 f13c0dc6f351291c29572c0836067bc1e345b19c3dfd6e9f692a2b0b515cab90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page