This is a library of shell scripts (with some python code) that I found useful for either everyday activities or once in a while optimizations.
This script assumes your primary unix shell is bash.
# download/clone a copy of the repository
$ git clone https://github.com/SubArtic15/Shell-Scripts.git
# change to local repository directory
$ cd Shell-Scripts
# set up script dependencies.
# WARNING: This script relies on a ~/.bash_profile file, as well as a bash driven shell.
$ ./setup GUESTThe container comamnd is an abstraction of existing docker commands and utility functions. This comamnd allows the user to create, manage, and destroy containers using a shorted syntax than native docker commands.
$ container
Usage: container [COMMAND]
An abstraction to docker commands.
Commands:
[image OR im] display docker images
[list OR ls] display all running docker containers
[rename OR rn] change the name of a given docker image
[create] create a background docker container
[kill] stop a given number or name of an active container
This command allows the user to split large files until smaller subfiles, this is very useful for managing files larger than 100,000+ lines.
$ splitter
Invalid Args
file_name: file to be split
file_prefix: prefix of new files.
length: length of split files(default=10000)# this will split a file named 'some_large_file.csv' into X number of smaller files that has
# a maximum of 10,000 lines per file.
$ splitter some_large_file.csv some_tiny_file
# change the current directory to the newly created directory containing the smaller files
$ cd some_tiny_file
# list all files in directory
$ ls
some_file_aa.csv some_file_ab.csv some_file_ac.csv
.
.
.
some_file_zx.csv some_file_zy.csv some_file_zz.csvThis command acts as a favorites system for your system directories. All shortcuts are managed and contained in a file created at ~/.launch_paths.json.
$ launch
Usage: launch [COMMAND]
A favorites based directory system.
Commands:
[--add] [shortcut] [path] add a new shortcut to system.
[--remove] [shortcut] removes an existing shortcut.
[shortcut] change directory to path associated with a given shortcut.
EXISTING SHORTCUTS
-----------------------------------------------
Shorcut: "Documents"
Description: "A shortcut to my documents folder"
Path: "/Users/UserName/Documents"NOTE: In order to add your current directory as a new shortcut, you must use the following command.
$ launch --add shortcutName $(pwd)As of this publish, there I have no more ideas on what other commands I should add to this list.