A collection of shell scripts that I made for myself. Maybe they can help you too!
Copy and paste this command to download this repository after you've changed directories to the folder you want.
git clone https://github.com/hussein-esmail7/sh
Then change directories into that folder.
cd sh
You can either make all the files executable or run them via bash by typing one of the two lines.
Option 1
bash <filename>.sh
Option 2
chmod +x *
./<filename>.sh
Here is a list of the file descriptions in this repository.
This program decodes a base64 string into a readable string. If the readable string is a URL, it automatically opens the URL in the default browser.
This program opens a list of files (as full paths) in Vim, and you can edit all the file names in that folder in Vim. Useful for formatting many titles at the same time. The only requirement is that you do not change the order of the lines in the buffer.
This program compiles files. Instead of trying to remember which program to use
to do it or if you need multiple lines, I have this program look at the given
file extension and let it do the work. Currently it works with these
extensions: .c
, .cpp
, .html
, .java
, .ms
, .pdf
, .py
, .sh
,
.tex
, and possibly more if I forget to update this README file...
-o
option: This opens the document after it is compiled if it isn't required
to open afterwards. Example: You don't need to open a compiled .pdf
document
from the passed .tex
file. Passing -o
opens that PDF afterwards.
⚠️ If using Okular, make sure you have this setting checked, or else it will keep opening new instances of the same PDF: In Okular,Settings > Configure Okular > Program (list of checkboxes) > Open new files in tabs (make sure it is checked)
-q
option: This option sets the program to quiet mode (as much as it can).
-k
option: When this option is given, the program does not delete any
temporary files that may have been created.
This program looks at what the given URL is, and determine what to open it in.
I mainly use this to open image and audio links in feh
, videos in mpv
, and
the rest in the default browser.
each image link using selenium.
link using selenium.
a Reddit Gallery link. It uses selenium, and prints the URLs all in one line, separated by a space.
time I want to send something to my repository, I just type gitpush
to send
it to Github. I'm even going to use this right after I finish typing this
sentence.
lot of data over the local network. If it is, someone is probably watching something on it.
have to worry about updating individual items and I just have to run this.
This program uses yt-dlp to download just the audio of a passed YouTube video. I use yt-dlp instead of YouTube-dl because it is better-maintained and downloads videos faster.