Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/claromes/useful

Lists of useful GNU/Linux commands
https://github.com/claromes/useful

Last synced: 26 days ago
JSON representation

Lists of useful GNU/Linux commands

Awesome Lists containing this project

README

        

# useful

Lists of useful GNU/Linux commands I use in my daily routine. The script uses `less` for pagination.

## Installation

```bash
git clone [email protected]:claromes/useful.git
```

```bash
cd useful && sudo chmod +x ./useful.sh
```

In the `.bashrc` file, add the following line:

```bash
alias useful='/home//useful/useful.sh'
```

## Usage

Available lists:
```bash
useful help
```

Show list:
```bash
useful
```
## Add your own commands and lists

Fork the project and modify the `useful.sh` script.

In the `###### COMMANDS ######` section, insert your commands, creating a new variable.

In the `###### ECHO ######` section, add another option to the case statement with the list name (`arg_name`) that will be passed as an argument, and the variable with the commands (`$NAME_CMD`).
```bash
arg_name)
echo "$NAME_CMD" | less -R
exit 0
;;
```

Don't forget to insert this new `arg_name` into the `HELP` variable, in the `###### HELP ######` section of the code.