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

https://github.com/rt75272/bash

Fun with Bash
https://github.com/rt75272/bash

bash cli linux shell-script terminal

Last synced: over 1 year ago
JSON representation

Fun with Bash

Awesome Lists containing this project

README

          

### __BASH__
*Bash tools and stuff*
 


### **Prereq**
**Install [Linux Debain 12](https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/)**
```sh
$ sudo apt -y isntall screenfetch
$ screenfetch
```
*screenfetch output*
![screenfetch](photos/screenfetch.png)


### **Grep for multiple phrases**
```sh
$ ls | grep 'phrase1\|phrase2'
```


### **Bash encryption tool**
```sh
$ sudo apt -y install mcrypt
$ nano test_file.txt #create test file
```
*GNU nano  test_mcrypt.txt*
```bash
encrypt this file with mcrypt

testing...

42
42
42
42
42
42
42
```
```bash
$ nano key.txt #create key
```
*GNU nano  key.txt*
```sh
greatPassword42!
```
```sh
$ mcrypt test_mcrypt.txt --keyfile key.txt # encrypt file
$ rm test_mcrypt.txt # remove original
$ ls
key.txt README.md test_mcrypt.txt.nc
$ mcrypt --decrypt text_mcrypt.txt.nc --keyfile key.txt
$ ls
key.txt README.md test_mcrypt.txt.nc test_mcrypt.txt
```
 
*Require a password/key to view decrypted file*
```sh
$ mcrypt encrypted_file.txt; rm encrypted_file.txt # only the encrypted file remains
Enter passphrase:
$ mcrypt -d encrypted_file.txt.nc
Enter passphrase:
File encrypted_file.txt was encrypted.
```
*Now you can encrypt all of your files so no one view them without the key/passphrase*


### **Look pro**
```sh
$ sudo apt -y install hollywood
$ hollywood
```
*Hollywood Screenshot*
![Hollywood](photos/hollywood.gif)




### **Internet speed test CLI**
*After cloning this bash repo...*
```sh
$ sudo apt -y install speedtest-cli
$ speedtest
```
![Speedtest Output](photos/speedtest.png)




### **Running Bash via Python**
*prereq*
```sh
$ sudo apt -y install cmatrix
```
*bash.py*
```py
import os

bash_command = os.popen('konsole --fullscreen -e cmatrix')
output = bash_command.read()
print(output)
```
```sh
$ python bash.py
```
*bash.py outputs cmatrix*
![bash.py output](photos/cmatrix.gif)




### **Send command via SSH to Raspberry Pi**
```sh
$ ssh pi@localhost 'ls -l'
```




### **Running dog**
*Have a dog running accross your screen*
```sh
$ sudo apt -y install oneko
$ oneko -dog -fg cyan
```
![oneko dog](photos/oneko_dog.gif)


### **Cow delivered fortune**
```sh
$ sudo apt -y install fortune
$ sudo apt -y install cowsay
$ fortune | cowsay
```
![Fortune Cow](photos/fortune_cow.png)


### **Generate random addresses**
```sh
$ sudo apy -y install rig
$ rig
```
![Random Address](photos/random_address.png)




### **Wikipedia Data**
_Could be useful for gathering semi-random data for data science/machine learning programs_
 
*Prereq*
```sh
$ sudo apt -y install nodejs
```
*Wiki package install*
```sh
$ sudo apt -y install wikit -g
```
*Run a wiki query*
```sh
$ wikit "machine learning"
```
*wikit machine learning output*
![wikit machine learning](photos/wikit.png)


### **Battery Status**
```sh
$ sudo apt -y install acpi
$ acpi -b
Battery 0: Discharging, 16%, 00:27:07 remaining
```


### **Fuzzy Finder Search**
```sh
$ sudo apt -y install fzf
$ fzf
```
![fuzzy search tool](photos/fzf.png)
 
*Searching for mcrypt encrypted files within this bash repo using fzf*


### **Terminal Search**
```sh
$ conda install googler
```


### **Terminal Train**
```sh
$ sudo apt -y install sl
```
![Sl Train](photos/sl_train.png)