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
- Host: GitHub
- URL: https://github.com/rt75272/bash
- Owner: rt75272
- Created: 2023-09-29T21:14:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T21:26:22.000Z (over 1 year ago)
- Last Synced: 2025-01-19T18:47:24.962Z (over 1 year ago)
- Topics: bash, cli, linux, shell-script, terminal
- Language: Shell
- Homepage:
- Size: 9.29 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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*

### **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*

### **Internet speed test CLI**
*After cloning this bash repo...*
```sh
$ sudo apt -y install speedtest-cli
$ speedtest
```

### **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*

### **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
```

### **Cow delivered fortune**
```sh
$ sudo apt -y install fortune
$ sudo apt -y install cowsay
$ fortune | cowsay
```

### **Generate random addresses**
```sh
$ sudo apy -y install rig
$ rig
```

### **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*

### **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
```

*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
```
