bash: warning: command substitution: ignored null byte in input
i don't even know if it's right to post it here, but I'm having that problem whenever I try to use bash-completion with yay -S ... I don't know what to do. I thought it was Starship so I deleted it, but it kept happening. It's not something that is going to k1ll me, but I would love if anyone could help me.
https://redd.it/1p9t4j3
@r_bash
i don't even know if it's right to post it here, but I'm having that problem whenever I try to use bash-completion with yay -S ... I don't know what to do. I thought it was Starship so I deleted it, but it kept happening. It's not something that is going to k1ll me, but I would love if anyone could help me.
https://redd.it/1p9t4j3
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Bash Floating Point Arithmetic Builtins-Only
https://github.com/Plankton5544/MASH/tree/main
https://redd.it/1p9vlfr
@r_bash
https://github.com/Plankton5544/MASH/tree/main
https://redd.it/1p9vlfr
@r_bash
GitHub
GitHub - Plankton5544/MASH: BASH builtins only interface for floating point arithmetic operations.
BASH builtins only interface for floating point arithmetic operations. - Plankton5544/MASH
Script to unrar file I right click on?
For some reason Linux Mint's archive manager crashes every time you use the right click "extract here" option for multi-part rar archives and you need to right click the file explorer, open in terminal, and then type "unrar x \*part1.rar" to extract the files.
As there is no way I can find just set unrar x as some kind of setting in archive manager my idea was to write a .sh noscript, place it in "/Applications", and add it to the list of "Open With" programs so now I have a right click option to extract rar files easier. But I can't get the code to work.
#!/bin/bash
if "*part1.rar" do unrar x
Pause -p "Check for errors then press any key to continue"
exit
https://redd.it/1p9vu42
@r_bash
For some reason Linux Mint's archive manager crashes every time you use the right click "extract here" option for multi-part rar archives and you need to right click the file explorer, open in terminal, and then type "unrar x \*part1.rar" to extract the files.
As there is no way I can find just set unrar x as some kind of setting in archive manager my idea was to write a .sh noscript, place it in "/Applications", and add it to the list of "Open With" programs so now I have a right click option to extract rar files easier. But I can't get the code to work.
#!/bin/bash
if "*part1.rar" do unrar x
Pause -p "Check for errors then press any key to continue"
exit
https://redd.it/1p9vu42
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
reloop - A oddly simple utility for devs.
http://github.com/xZepyx/reloop
https://redd.it/1p9tcuh
@r_bash
http://github.com/xZepyx/reloop
https://redd.it/1p9tcuh
@r_bash
GitHub
GitHub - xZepyx/reloop: A simple terminal utility that helps devs run commands (eg. build commands) whenever the specifed file…
A simple terminal utility that helps devs run commands (eg. build commands) whenever the specifed file is changed. - xZepyx/reloop
Amber the programming language compiled to Bash, 0.5.1 release
https://docs.amber-lang.com/getting_started/whats_new
https://redd.it/1pc4lxa
@r_bash
https://docs.amber-lang.com/getting_started/whats_new
https://redd.it/1pc4lxa
@r_bash
Documentation for Amber programming language
Amber Documentation
h - A Bash Help Tool for Aliases, Functions, Keywords, and Commands
---
Title:
Body:
Hi Everyone!
I’ve been working on a tool called
---
Repo:
https://github.com/JB63134/bashh
---
## **Features**
* Analyze **builtins, aliases, keywords, functions, and external commands**
* Shows **where a command is defined** (files, line numbers, or shell)
* Displays **alias expansions** and function contents
* Provides **help output** or points to `man` / `info` pages
* Syntax-highlighted preview for functions and noscripts (`batcat` preferred, fallback to Perl)
* Integrates with **fzf** for interactive command search
* Automatic detection of commonly used **admin paths**
---
## **Usage**
```bash
h [command] # Analyze the given command
h # Analyze your most‑recent command
h -f # Launch interactive search using fzf
h -h | --help # Show usage instructions
h -v | --version # Show version info
```
---
## **Examples**
```bash
05:08:13 Tue Dec 02: ~ $ h exit
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'exit' is a shell builtin
↳ Showing 'help exit':
exit: exit [n]
Exit the shell.
Exits the shell with a status of N. If N is omitted, the exit status
is that of the last command executed.
05:08:21 Tue Dec 02: ~ $ h then
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ Detected BASH Keyword 'then'
↳ then -- Begins the command block for a true condition.
05:08:24 Tue Dec 02: ~ $ h ls
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'ls' is an alias → resolves to: alias ls='printf "\n" && ls --color=auto'
↳ Defined in: /home/jb/.bashrc (line 96)
05:08:26 Tue Dec 02: ~ $ h cd
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'cd' is a shell function
↳ Declared in: /home/jb/.bashfunctions (line 28)
↳ Showing function: cd
cd ()
{
builtin cd "${@:-$HOME}" && printf "\n" && ls --color=auto
}
─── End of function 'cd' ───
05:08:28 Tue Dec 02: ~ $ h wallpaper
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'wallpaper' is an external command
↳ Path: /home/jb/bin/noscripts/wallpaper
↳ Showing noscript 'wallpaper':
───────┬────────────────────────────────────────────────────────────────────────
│ File: /home/jb/bin/noscripts/wallpaper
───────┼────────────────────────────────────────────────────────────────────────
1 │ #!/usr/bin/env bash
2 │ # ------------------------------------------------------------
3 │ # Random Wallpaper Setter
4 │ # ------------------------------------------------------------
5 │ WALLPAPERDIR="$HOME/Pictures/Wallpapers"
6 │
7 │ mkdir -p "$WALLPAPERDIR"
8 │ # --- Pick a random image
9 │ file=$(find "$WALLPAPERDIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) | shuf -n 1)
10 │
11 │ if [[ -z "$file" ]]; then
12 │ printf "No images found in %s\n" "$WALLPAPERDIR"
13 │ exit 1
14 │ fi
15 │
16 │ # Build uri path
17 │ uri="file://$file"
18 │
19 │ # Apply wallpaper
20 │ gsettings set org.gnome.desktop.background picture-uri "$uri"
21 │ gsettings set
---
Title:
h – is a full fledged command resolution engine that unifies help into one shortcut - hBody:
Hi Everyone!
I’ve been working on a tool called
h that helps you understand exactly what a Bash command is doing, whether it’s an alias, function, builtin, keyword, or external command. ---
Repo:
https://github.com/JB63134/bashh
---
## **Features**
* Analyze **builtins, aliases, keywords, functions, and external commands**
* Shows **where a command is defined** (files, line numbers, or shell)
* Displays **alias expansions** and function contents
* Provides **help output** or points to `man` / `info` pages
* Syntax-highlighted preview for functions and noscripts (`batcat` preferred, fallback to Perl)
* Integrates with **fzf** for interactive command search
* Automatic detection of commonly used **admin paths**
---
## **Usage**
```bash
h [command] # Analyze the given command
h # Analyze your most‑recent command
h -f # Launch interactive search using fzf
h -h | --help # Show usage instructions
h -v | --version # Show version info
```
---
## **Examples**
```bash
05:08:13 Tue Dec 02: ~ $ h exit
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'exit' is a shell builtin
↳ Showing 'help exit':
exit: exit [n]
Exit the shell.
Exits the shell with a status of N. If N is omitted, the exit status
is that of the last command executed.
05:08:21 Tue Dec 02: ~ $ h then
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ Detected BASH Keyword 'then'
↳ then -- Begins the command block for a true condition.
05:08:24 Tue Dec 02: ~ $ h ls
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'ls' is an alias → resolves to: alias ls='printf "\n" && ls --color=auto'
↳ Defined in: /home/jb/.bashrc (line 96)
05:08:26 Tue Dec 02: ~ $ h cd
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'cd' is a shell function
↳ Declared in: /home/jb/.bashfunctions (line 28)
↳ Showing function: cd
cd ()
{
builtin cd "${@:-$HOME}" && printf "\n" && ls --color=auto
}
─── End of function 'cd' ───
05:08:28 Tue Dec 02: ~ $ h wallpaper
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'wallpaper' is an external command
↳ Path: /home/jb/bin/noscripts/wallpaper
↳ Showing noscript 'wallpaper':
───────┬────────────────────────────────────────────────────────────────────────
│ File: /home/jb/bin/noscripts/wallpaper
───────┼────────────────────────────────────────────────────────────────────────
1 │ #!/usr/bin/env bash
2 │ # ------------------------------------------------------------
3 │ # Random Wallpaper Setter
4 │ # ------------------------------------------------------------
5 │ WALLPAPERDIR="$HOME/Pictures/Wallpapers"
6 │
7 │ mkdir -p "$WALLPAPERDIR"
8 │ # --- Pick a random image
9 │ file=$(find "$WALLPAPERDIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) | shuf -n 1)
10 │
11 │ if [[ -z "$file" ]]; then
12 │ printf "No images found in %s\n" "$WALLPAPERDIR"
13 │ exit 1
14 │ fi
15 │
16 │ # Build uri path
17 │ uri="file://$file"
18 │
19 │ # Apply wallpaper
20 │ gsettings set org.gnome.desktop.background picture-uri "$uri"
21 │ gsettings set
h - A Bash Help Tool for Aliases, Functions, Keywords, and Commands
---
**Title:**
`h` – is a full fledged command resolution engine that unifies help into one shortcut - h
**Body:**
Hi Everyone!
I’ve been working on a tool called `h` that helps you **understand exactly what a Bash command is doing**, whether it’s an alias, function, builtin, keyword, or external command.
---
**Repo:**
https://github.com/JB63134/bash_h
---
## **Features**
* Analyze **builtins, aliases, keywords, functions, and external commands**
* Shows **where a command is defined** (files, line numbers, or shell)
* Displays **alias expansions** and function contents
* Provides **help output** or points to `man` / `info` pages
* Syntax-highlighted preview for functions and noscripts (`batcat` preferred, fallback to Perl)
* Integrates with **fzf** for interactive command search
* Automatic detection of commonly used **admin paths**
---
## **Usage**
```bash
h [command] # Analyze the given command
h # Analyze your most‑recent command
h -f # Launch interactive search using fzf
h -h | --help # Show usage instructions
h -v | --version # Show version info
```
---
## **Examples**
```bash
05:08:13 Tue Dec 02: ~ $ h exit
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'exit' is a shell builtin
↳ Showing 'help exit':
exit: exit [n]
Exit the shell.
Exits the shell with a status of N. If N is omitted, the exit status
is that of the last command executed.
05:08:21 Tue Dec 02: ~ $ h then
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ Detected BASH Keyword 'then'
↳ then -- Begins the command block for a true condition.
05:08:24 Tue Dec 02: ~ $ h ls
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'ls' is an alias → resolves to: alias ls='printf "\n" && ls --color=auto'
↳ Defined in: /home/jb/.bashrc (line 96)
05:08:26 Tue Dec 02: ~ $ h cd
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'cd' is a shell function
↳ Declared in: /home/jb/.bash_functions (line 28)
↳ Showing function: cd
cd ()
{
builtin cd "${@:-$HOME}" && printf "\n" && ls --color=auto
}
─── End of function 'cd' ───
05:08:28 Tue Dec 02: ~ $ h wallpaper
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'wallpaper' is an external command
↳ Path: /home/jb/bin/noscripts/wallpaper
↳ Showing noscript 'wallpaper':
───────┬────────────────────────────────────────────────────────────────────────
│ File: /home/jb/bin/noscripts/wallpaper
───────┼────────────────────────────────────────────────────────────────────────
1 │ #!/usr/bin/env bash
2 │ # ------------------------------------------------------------
3 │ # Random Wallpaper Setter
4 │ # ------------------------------------------------------------
5 │ WALLPAPER_DIR="$HOME/Pictures/Wallpapers"
6 │
7 │ mkdir -p "$WALLPAPER_DIR"
8 │ # --- Pick a random image
9 │ file=$(find "$WALLPAPER_DIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) | shuf -n 1)
10 │
11 │ if [[ -z "$file" ]]; then
12 │ printf "No images found in %s\n" "$WALLPAPER_DIR"
13 │ exit 1
14 │ fi
15 │
16 │ # Build uri path
17 │ uri="file://$file"
18 │
19 │ # Apply wallpaper
20 │ gsettings set org.gnome.desktop.background picture-uri "$uri"
21 │ gsettings set
---
**Title:**
`h` – is a full fledged command resolution engine that unifies help into one shortcut - h
**Body:**
Hi Everyone!
I’ve been working on a tool called `h` that helps you **understand exactly what a Bash command is doing**, whether it’s an alias, function, builtin, keyword, or external command.
---
**Repo:**
https://github.com/JB63134/bash_h
---
## **Features**
* Analyze **builtins, aliases, keywords, functions, and external commands**
* Shows **where a command is defined** (files, line numbers, or shell)
* Displays **alias expansions** and function contents
* Provides **help output** or points to `man` / `info` pages
* Syntax-highlighted preview for functions and noscripts (`batcat` preferred, fallback to Perl)
* Integrates with **fzf** for interactive command search
* Automatic detection of commonly used **admin paths**
---
## **Usage**
```bash
h [command] # Analyze the given command
h # Analyze your most‑recent command
h -f # Launch interactive search using fzf
h -h | --help # Show usage instructions
h -v | --version # Show version info
```
---
## **Examples**
```bash
05:08:13 Tue Dec 02: ~ $ h exit
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'exit' is a shell builtin
↳ Showing 'help exit':
exit: exit [n]
Exit the shell.
Exits the shell with a status of N. If N is omitted, the exit status
is that of the last command executed.
05:08:21 Tue Dec 02: ~ $ h then
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ Detected BASH Keyword 'then'
↳ then -- Begins the command block for a true condition.
05:08:24 Tue Dec 02: ~ $ h ls
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'ls' is an alias → resolves to: alias ls='printf "\n" && ls --color=auto'
↳ Defined in: /home/jb/.bashrc (line 96)
05:08:26 Tue Dec 02: ~ $ h cd
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'cd' is a shell function
↳ Declared in: /home/jb/.bash_functions (line 28)
↳ Showing function: cd
cd ()
{
builtin cd "${@:-$HOME}" && printf "\n" && ls --color=auto
}
─── End of function 'cd' ───
05:08:28 Tue Dec 02: ~ $ h wallpaper
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'wallpaper' is an external command
↳ Path: /home/jb/bin/noscripts/wallpaper
↳ Showing noscript 'wallpaper':
───────┬────────────────────────────────────────────────────────────────────────
│ File: /home/jb/bin/noscripts/wallpaper
───────┼────────────────────────────────────────────────────────────────────────
1 │ #!/usr/bin/env bash
2 │ # ------------------------------------------------------------
3 │ # Random Wallpaper Setter
4 │ # ------------------------------------------------------------
5 │ WALLPAPER_DIR="$HOME/Pictures/Wallpapers"
6 │
7 │ mkdir -p "$WALLPAPER_DIR"
8 │ # --- Pick a random image
9 │ file=$(find "$WALLPAPER_DIR" -maxdepth 1 -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -o -iname "*.webp" \) | shuf -n 1)
10 │
11 │ if [[ -z "$file" ]]; then
12 │ printf "No images found in %s\n" "$WALLPAPER_DIR"
13 │ exit 1
14 │ fi
15 │
16 │ # Build uri path
17 │ uri="file://$file"
18 │
19 │ # Apply wallpaper
20 │ gsettings set org.gnome.desktop.background picture-uri "$uri"
21 │ gsettings set
GitHub
GitHub - JB63134/bash_h: h - a BASH help tool
h - a BASH help tool. Contribute to JB63134/bash_h development by creating an account on GitHub.
org.gnome.desktop.background picture-uri-dark "$uri"
22 │ printf "Wallpaper has been Changed\n"
───────┴────────────────────────────────────────────────────────────────────────
─── End of noscript 'wallpaper' ───
05:08:33 Tue Dec 02: ~ $ h wc
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'wc' is an external command
↳ Path: /usr/bin/wc
↳ Showing 'wc --help':
Usage: /usr/bin/wc [OPTION]... [FILE]...
or: /usr/bin/wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. A word is a nonempty sequence of non white
space delimited by white space characters or by start or end of input.
With no FILE, or when FILE is -, read standard input.
The options below may be used to select which counts are printed, always in
the following order: newline, word, character, byte, maximum line length.
-c, --bytes print the byte counts
-m, --chars print the character counts
-l, --lines print the newline counts
--files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is - then read names from standard input
-L, --max-line-length print the maximum display width
-w, --words print the word counts
--total=WHEN when to print a line with total counts;
WHEN can be: auto, always, only, never
--help display this help and exit
--version output version information and exit
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/wc>
or available locally via: info '(coreutils) wc invocation'
05:09:05 Tue Dec 02: ~ $
```
---
## **Installation**
Just source the noscript in your `.bashrc` or `.bash_profile`:
```bash
source /path/to/bash_h
```
---
https://redd.it/1pc5uua
@r_bash
22 │ printf "Wallpaper has been Changed\n"
───────┴────────────────────────────────────────────────────────────────────────
─── End of noscript 'wallpaper' ───
05:08:33 Tue Dec 02: ~ $ h wc
╔══════════════════════════════════════════════╗
║ h – Bash Help Tool ║
╚══════════════════════════════════════════════╝
├─ 'wc' is an external command
↳ Path: /usr/bin/wc
↳ Showing 'wc --help':
Usage: /usr/bin/wc [OPTION]... [FILE]...
or: /usr/bin/wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. A word is a nonempty sequence of non white
space delimited by white space characters or by start or end of input.
With no FILE, or when FILE is -, read standard input.
The options below may be used to select which counts are printed, always in
the following order: newline, word, character, byte, maximum line length.
-c, --bytes print the byte counts
-m, --chars print the character counts
-l, --lines print the newline counts
--files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is - then read names from standard input
-L, --max-line-length print the maximum display width
-w, --words print the word counts
--total=WHEN when to print a line with total counts;
WHEN can be: auto, always, only, never
--help display this help and exit
--version output version information and exit
GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Full documentation <https://www.gnu.org/software/coreutils/wc>
or available locally via: info '(coreutils) wc invocation'
05:09:05 Tue Dec 02: ~ $
```
---
## **Installation**
Just source the noscript in your `.bashrc` or `.bash_profile`:
```bash
source /path/to/bash_h
```
---
https://redd.it/1pc5uua
@r_bash
www.gnu.org
wc invocation (GNU Coreutils 9.9)
Next: sum: Print checksum and block counts, Up: Summarizing files [Contents][Index]
ca – Bash Command Analyzer (aliases, functions, binaries, keywords, noscripts, $PATH & more)
---
**Title:**
🔍 `ca` – Bash Command Analyzer (aliases, functions, binaries, keywords, noscripts, $PATH & more)
**Body:**
Hi everyone!
I’ve been working on a tool called `ca` — a Bash Command Analyzer that inspects **any command in your shell** and tells you exactly what it is: alias, function, builtin, keyword, or external binary/noscript. Think of it as a **supercharged `type`/`which`/`declare`/`stat`/`file`/`ldd`/`getcap` combo** with extra insights for auditing and debugging.
https://github.com/JB63134/bash_ca
---
## Features
* Inspect **aliases, functions, builtins, keywords, external binaries/noscripts**.
* Shows **definition location**, line numbers, permissions, ownership, timestamps, and package info.
* Recursively resolves **alias expansions** and shell introspection.
* Syntax-highlighted preview for functions and noscripts (`batcat` preferred, fallback to Perl)
* Integrates with **fzf** for interactive command search
* Automatic detection of commonly used **admin paths**
* Advanced modes:
* `-o` → Detect commands overridden by aliases/functions
* `-p` → Inspect your PATH, directory order & permissions
* `-s` → List sourced Bash files in the current session
* `-S` → Scan for SUID/SGID binaries & world-writable directories
---
## Simple Usage
```bash
ca [command] # Inspect a specific command
ca # Inspect most recent command
ca -o # Show overridden commands (aliases/functions)
ca -p # Inspect PATH directories
ca -s # List sourced Bash files
ca -S # Check SUID/SGID and world-writable dirs
```
---
## Examples
```bash
06:29:39 Tue Dec 02: ~ $ ca awk
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
├─ 'awk' is an external command
↳ Path: /usr/bin/awk
↳ Symbolic link to: /usr/bin/mawk
↳ Now Examining: /usr/bin/mawk
↳ Shadowed versions:
│ /bin/mawk
↳ File Size: 166.7 KB
↳ Executable Type: ELF binary - Dynamically linked
⎟ ELF 64-bit LSB pie executable, x86-64
⎟ version 1 (SYSV)
⎟ dynamically linked
⎟ interpreter /lib64/ld-linux-x86-64.so.2
⎟ BuildID[sha1]=cc81073357a89867fe0c0f00033a0547bcf4d0e6
⎟ for GNU/Linux 3.2.0, stripped
↳ Dependencies:
⎟ linux-vdso.so.1 (0x00007fbb29ea1000)
⎟ libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbb29d54000)
⎟ libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbb29b5e000)
⎟ /lib64/ld-linux-x86-64.so.2 (0x00007fbb29ea3000)
↳ Package Info:
⎟ Package: mawk
⎟ Version: 1.3.4.20250131-1
⎟ Maintainer: Boyuan Yang <byang@debian.org>
⎟ Denoscription: Pattern scanning and text processing language
↳ Permissions: -rwxr-xr-x (octal: 755)
⎟ ↳ Owner/Group: root:root
⎟ ↳ Owner: rwx Group: r-x Others: r-x
↳ Timestamps:
⎟ ↳ File created (crtime): 2025-09-16 17:47:02.113599418 -0500
⎟ ↳ Last status change (ctime): 2025-09-16 17:47:02.117599418 -0500
⎟ ↳ Last modified (mtime): 2025-02-04 07:40:44.000000000 -0600
⎟ ↳ Last accessed (atime): 2025-12-02 00:45:59.880781082 -0600
└──────────────────────────────────────────
05:30:42 Tue Dec 02: ~ $ ca -o
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== Override Inspection (Mode: -o) ========
├─ Examining aliases to detect overridden commands:
↳ Alias egrep overrides at least one external command of the same name.
↳ Alias fgrep overrides at least one external command of the same name.
↳ Alias grep overrides at least one external command of the same name.
↳ Alias ls overrides at least one external command of the same name.
├─ Examining functions to detect overridden commands:
↳ Function cd overrides a builtin of the same name.
├─ Examining disabled builtins to identify any
---
**Title:**
🔍 `ca` – Bash Command Analyzer (aliases, functions, binaries, keywords, noscripts, $PATH & more)
**Body:**
Hi everyone!
I’ve been working on a tool called `ca` — a Bash Command Analyzer that inspects **any command in your shell** and tells you exactly what it is: alias, function, builtin, keyword, or external binary/noscript. Think of it as a **supercharged `type`/`which`/`declare`/`stat`/`file`/`ldd`/`getcap` combo** with extra insights for auditing and debugging.
https://github.com/JB63134/bash_ca
---
## Features
* Inspect **aliases, functions, builtins, keywords, external binaries/noscripts**.
* Shows **definition location**, line numbers, permissions, ownership, timestamps, and package info.
* Recursively resolves **alias expansions** and shell introspection.
* Syntax-highlighted preview for functions and noscripts (`batcat` preferred, fallback to Perl)
* Integrates with **fzf** for interactive command search
* Automatic detection of commonly used **admin paths**
* Advanced modes:
* `-o` → Detect commands overridden by aliases/functions
* `-p` → Inspect your PATH, directory order & permissions
* `-s` → List sourced Bash files in the current session
* `-S` → Scan for SUID/SGID binaries & world-writable directories
---
## Simple Usage
```bash
ca [command] # Inspect a specific command
ca # Inspect most recent command
ca -o # Show overridden commands (aliases/functions)
ca -p # Inspect PATH directories
ca -s # List sourced Bash files
ca -S # Check SUID/SGID and world-writable dirs
```
---
## Examples
```bash
06:29:39 Tue Dec 02: ~ $ ca awk
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
├─ 'awk' is an external command
↳ Path: /usr/bin/awk
↳ Symbolic link to: /usr/bin/mawk
↳ Now Examining: /usr/bin/mawk
↳ Shadowed versions:
│ /bin/mawk
↳ File Size: 166.7 KB
↳ Executable Type: ELF binary - Dynamically linked
⎟ ELF 64-bit LSB pie executable, x86-64
⎟ version 1 (SYSV)
⎟ dynamically linked
⎟ interpreter /lib64/ld-linux-x86-64.so.2
⎟ BuildID[sha1]=cc81073357a89867fe0c0f00033a0547bcf4d0e6
⎟ for GNU/Linux 3.2.0, stripped
↳ Dependencies:
⎟ linux-vdso.so.1 (0x00007fbb29ea1000)
⎟ libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbb29d54000)
⎟ libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbb29b5e000)
⎟ /lib64/ld-linux-x86-64.so.2 (0x00007fbb29ea3000)
↳ Package Info:
⎟ Package: mawk
⎟ Version: 1.3.4.20250131-1
⎟ Maintainer: Boyuan Yang <byang@debian.org>
⎟ Denoscription: Pattern scanning and text processing language
↳ Permissions: -rwxr-xr-x (octal: 755)
⎟ ↳ Owner/Group: root:root
⎟ ↳ Owner: rwx Group: r-x Others: r-x
↳ Timestamps:
⎟ ↳ File created (crtime): 2025-09-16 17:47:02.113599418 -0500
⎟ ↳ Last status change (ctime): 2025-09-16 17:47:02.117599418 -0500
⎟ ↳ Last modified (mtime): 2025-02-04 07:40:44.000000000 -0600
⎟ ↳ Last accessed (atime): 2025-12-02 00:45:59.880781082 -0600
└──────────────────────────────────────────
05:30:42 Tue Dec 02: ~ $ ca -o
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== Override Inspection (Mode: -o) ========
├─ Examining aliases to detect overridden commands:
↳ Alias egrep overrides at least one external command of the same name.
↳ Alias fgrep overrides at least one external command of the same name.
↳ Alias grep overrides at least one external command of the same name.
↳ Alias ls overrides at least one external command of the same name.
├─ Examining functions to detect overridden commands:
↳ Function cd overrides a builtin of the same name.
├─ Examining disabled builtins to identify any
GitHub
GitHub - JB63134/bash_ca: ca - a buggy BASH Command Analyzer
ca - a buggy BASH Command Analyzer. Contribute to JB63134/bash_ca development by creating an account on GitHub.
replacement commands:
↳ No builtins are disabled.
======== End of list ========
05:32:47 Tue Dec 02: ~ $ ca -p
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== PATH Inspection (Mode: -p) ========
├─ Examining PATH directory Order and Permissions:
↳ Directory Perms Owner:Group Note
↳ /home/jb/bin drwxr-xr-x jb:jb Writable
↳ /home/jb/bin/noscripts drwxr-xr-x jb:jb Writable
↳ /home/jb/.local/bin drwxr-xr-x jb:jb Writable
↳ /usr/local/bin drwxr-xr-x root:root
↳ /usr/bin drwxr-xr-x root:root
↳ /bin lrwxrwxrwx root:root
↳ /usr/local/games drwxr-xr-x root:root
↳ /usr/games drwxr-xr-x root:root
======== End of list ========
05:32:53 Tue Dec 02: ~ $ ca -s
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== Sourced File Inspection (Mode: -s) ========
├─ Searching for files that have been sourced into the enviroment automatically
↳ Discovered the following files:
↳ /home/jb/.bashrc
↳ /usr/share/bash-completion/bash_completion
↳ /etc/bash_completion
↳ /home/jb/.bash_aliases
↳ /home/jb/.bash_functions
↳ /home/jb/.bash_ca
↳ /home/jb/.bash_h
↳ /etc/bash.bashrc
======== End of list ========
05:32:57 Tue Dec 02: ~ $ ca -S
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== SUID/SGID and World-Writable directories (Mode: -S) ========
├─ Scanning for SUID binaries:
↳ -rwsr-xr-x 1 root root 70888 Apr 19 2025 /usr/bin/chfn
↳ -rwsr-xr-x 1 root root 52936 Apr 19 2025 /usr/bin/chsh
↳ -rwsr-xr-x 1 root root 39224 Jul 16 12:27 /usr/bin/fusermount3
↳ -rwsr-xr-x 1 root root 88568 Apr 19 2025 /usr/bin/gpasswd
↳ -rwsr-xr-x 1 root root 72072 May 9 2025 /usr/bin/mount
↳ -rwsr-xr-x 1 root root 18816 May 9 2025 /usr/bin/newgrp
↳ -rwsr-xr-x 1 root root 166848 Oct 5 2024 /usr/bin/ntfs-3g
↳ -rwsr-xr-x 1 root root 118168 Apr 19 2025 /usr/bin/passwd
↳ -rwsr-xr-x 1 root root 30952 Jan 17 2025 /usr/bin/pkexec
↳ -rwsr-xr-x 1 root root 84360 May 9 2025 /usr/bin/su
↳ -rwsr-xr-x 1 root root 306456 Jun 30 00:55 /usr/bin/sudo
↳ -rwsr-xr-x 1 root root 55688 May 9 2025 /usr/bin/umount
↳ -rwsr-xr-- 1 root messagebus 51272 Mar 8 2025 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
↳ -rwsr-xr-x 1 root root 18512 Apr 18 2025 /usr/libexec/spice-client-glib-usb-acl-helper
↳ -rwsr-xr-x 1 root root 494144 Aug 1 10:02 /usr/lib/openssh/ssh-keysign
↳ -rwsr-xr-x 1 root root 18744 Jan 17 2025 /usr/lib/polkit-1/polkit-agent-helper-1
↳ -rwsr-sr-x 1 root root 14672 Oct 27 12:03 /usr/lib/xorg/Xorg.wrap
↳ -rwsr-xr-x 1 root root 146480 Mar 31 2025 /usr/sbin/mount.nfs
↳ -rwsr-xr-- 1 root dip 428424 Feb 17 2025 /usr/sbin/pppd
├─ Scanning for SGID binaries:
↳ -rwxr-sr-x 1 root shadow 113848 Apr 19 2025 /usr/bin/chage
↳ -rwxr-sr-x 1 root crontab 51936 Jun 13 03:30 /usr/bin/crontab
↳ -rwxr-sr-x 1 root mail 23104 Dec 31 2024 /usr/bin/dotlockfile
↳ -rwxr-sr-x 1 root shadow 31256 Apr 19 2025 /usr/bin/expiry
↳ -rwxr-sr-x 1 root _ssh 420224 Aug 1 10:02 /usr/bin/ssh-agent
↳ -rwxr-sr-x 1 root mail 22784 Nov 5 17:01 /usr/libexec/camel-lock-helper-1.2
↳ -rwxr-sr-x 1
↳ No builtins are disabled.
======== End of list ========
05:32:47 Tue Dec 02: ~ $ ca -p
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== PATH Inspection (Mode: -p) ========
├─ Examining PATH directory Order and Permissions:
↳ Directory Perms Owner:Group Note
↳ /home/jb/bin drwxr-xr-x jb:jb Writable
↳ /home/jb/bin/noscripts drwxr-xr-x jb:jb Writable
↳ /home/jb/.local/bin drwxr-xr-x jb:jb Writable
↳ /usr/local/bin drwxr-xr-x root:root
↳ /usr/bin drwxr-xr-x root:root
↳ /bin lrwxrwxrwx root:root
↳ /usr/local/games drwxr-xr-x root:root
↳ /usr/games drwxr-xr-x root:root
======== End of list ========
05:32:53 Tue Dec 02: ~ $ ca -s
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== Sourced File Inspection (Mode: -s) ========
├─ Searching for files that have been sourced into the enviroment automatically
↳ Discovered the following files:
↳ /home/jb/.bashrc
↳ /usr/share/bash-completion/bash_completion
↳ /etc/bash_completion
↳ /home/jb/.bash_aliases
↳ /home/jb/.bash_functions
↳ /home/jb/.bash_ca
↳ /home/jb/.bash_h
↳ /etc/bash.bashrc
======== End of list ========
05:32:57 Tue Dec 02: ~ $ ca -S
╔══════════════════════════════════════════════╗
║ ca – Bash Command Analyzer ║
╚══════════════════════════════════════════════╝
======== SUID/SGID and World-Writable directories (Mode: -S) ========
├─ Scanning for SUID binaries:
↳ -rwsr-xr-x 1 root root 70888 Apr 19 2025 /usr/bin/chfn
↳ -rwsr-xr-x 1 root root 52936 Apr 19 2025 /usr/bin/chsh
↳ -rwsr-xr-x 1 root root 39224 Jul 16 12:27 /usr/bin/fusermount3
↳ -rwsr-xr-x 1 root root 88568 Apr 19 2025 /usr/bin/gpasswd
↳ -rwsr-xr-x 1 root root 72072 May 9 2025 /usr/bin/mount
↳ -rwsr-xr-x 1 root root 18816 May 9 2025 /usr/bin/newgrp
↳ -rwsr-xr-x 1 root root 166848 Oct 5 2024 /usr/bin/ntfs-3g
↳ -rwsr-xr-x 1 root root 118168 Apr 19 2025 /usr/bin/passwd
↳ -rwsr-xr-x 1 root root 30952 Jan 17 2025 /usr/bin/pkexec
↳ -rwsr-xr-x 1 root root 84360 May 9 2025 /usr/bin/su
↳ -rwsr-xr-x 1 root root 306456 Jun 30 00:55 /usr/bin/sudo
↳ -rwsr-xr-x 1 root root 55688 May 9 2025 /usr/bin/umount
↳ -rwsr-xr-- 1 root messagebus 51272 Mar 8 2025 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
↳ -rwsr-xr-x 1 root root 18512 Apr 18 2025 /usr/libexec/spice-client-glib-usb-acl-helper
↳ -rwsr-xr-x 1 root root 494144 Aug 1 10:02 /usr/lib/openssh/ssh-keysign
↳ -rwsr-xr-x 1 root root 18744 Jan 17 2025 /usr/lib/polkit-1/polkit-agent-helper-1
↳ -rwsr-sr-x 1 root root 14672 Oct 27 12:03 /usr/lib/xorg/Xorg.wrap
↳ -rwsr-xr-x 1 root root 146480 Mar 31 2025 /usr/sbin/mount.nfs
↳ -rwsr-xr-- 1 root dip 428424 Feb 17 2025 /usr/sbin/pppd
├─ Scanning for SGID binaries:
↳ -rwxr-sr-x 1 root shadow 113848 Apr 19 2025 /usr/bin/chage
↳ -rwxr-sr-x 1 root crontab 51936 Jun 13 03:30 /usr/bin/crontab
↳ -rwxr-sr-x 1 root mail 23104 Dec 31 2024 /usr/bin/dotlockfile
↳ -rwxr-sr-x 1 root shadow 31256 Apr 19 2025 /usr/bin/expiry
↳ -rwxr-sr-x 1 root _ssh 420224 Aug 1 10:02 /usr/bin/ssh-agent
↳ -rwxr-sr-x 1 root mail 22784 Nov 5 17:01 /usr/libexec/camel-lock-helper-1.2
↳ -rwxr-sr-x 1
root utmp 14416 Nov 12 2024 /usr/lib/x86_64-linux-gnu/utempter/utempter
↳ -rwsr-sr-x 1 root root 14672 Oct 27 12:03 /usr/lib/xorg/Xorg.wrap
↳ -rwxr-sr-x 1 root shadow 43256 Jun 29 12:40 /usr/sbin/unix_chkpwd
├─ Scanning for World-Writable directories:
↳ /run/lock drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.font-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.XIM-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.ICE-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.X11-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /dev/mqueue drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /dev/shm drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /var/tmp drwxrwxrwt root:root WORLD-WRITABLE + STICKY
```
---
## Installation
```bash
source /path/to/bash_ca
```
Then call `ca` from your shell.
---
`ca` is useful if you want to:
* Audit your shell for overridden or shadowed commands.
* Inspect binaries for permissions, package info, or SUID/SGID bits.
* Debug complex aliases and shell functions.
* See which files are sourced automatically in your environment.
---
edited to add example
https://redd.it/1pc6f5e
@r_bash
↳ -rwsr-sr-x 1 root root 14672 Oct 27 12:03 /usr/lib/xorg/Xorg.wrap
↳ -rwxr-sr-x 1 root shadow 43256 Jun 29 12:40 /usr/sbin/unix_chkpwd
├─ Scanning for World-Writable directories:
↳ /run/lock drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.font-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.XIM-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.ICE-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /tmp/.X11-unix drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /dev/mqueue drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /dev/shm drwxrwxrwt root:root WORLD-WRITABLE + STICKY
↳ /var/tmp drwxrwxrwt root:root WORLD-WRITABLE + STICKY
```
---
## Installation
```bash
source /path/to/bash_ca
```
Then call `ca` from your shell.
---
`ca` is useful if you want to:
* Audit your shell for overridden or shadowed commands.
* Inspect binaries for permissions, package info, or SUID/SGID bits.
* Debug complex aliases and shell functions.
* See which files are sourced automatically in your environment.
---
edited to add example
https://redd.it/1pc6f5e
@r_bash
Reddit
From the bash community on Reddit: ca – Bash Command Analyzer (aliases, functions, binaries, keywords, noscripts, $PATH & more)
Explore this post and more from the bash community
My bash power toys
I'm happy to bring my own dotfiles to this channel.
https://gitlab.com/hambled/dotfiles
I've been working on it daily for years and have built a lot of tools that I find very useful in my day-to-day work as a sysadmin.
This dotfiles includes interesting tools such as a file explorer (built on fzf), a tool for inspecting commands, variables, and manuals, another for managing various histfiles (contexts) and many more.
The main issue you might have is that it's in Spanish, but it's my native language and the one I feel most comfortable with. I apologize for that "inconvenience."
Bye!
https://redd.it/1pci2vf
@r_bash
I'm happy to bring my own dotfiles to this channel.
https://gitlab.com/hambled/dotfiles
I've been working on it daily for years and have built a lot of tools that I find very useful in my day-to-day work as a sysadmin.
This dotfiles includes interesting tools such as a file explorer (built on fzf), a tool for inspecting commands, variables, and manuals, another for managing various histfiles (contexts) and many more.
The main issue you might have is that it's in Spanish, but it's my native language and the one I feel most comfortable with. I apologize for that "inconvenience."
Bye!
https://redd.it/1pci2vf
@r_bash
GitLab
Alberto Millán / dotfiles · GitLab
Ficheros de configuración
Tmux not starting from noscript
\#!/bin/bash
\#python study workspace
hyprctl dispatch workspace 1
hyprctl dispatch exec "kitty -e sh -lc '/usr/bin/tmux a -t cs50p || /usr/bin/tmux exec bash'"
sleep 2
hyprctl dispatch exec brave "https://www.youtube.com/playlist?list=PLhQjrBD2T3817j24-GogXmWqO5Q5vYy0V \\
https://cs50.harvard.edu/python/psets/6/ \\
https://github.com/cyberseekerx"
sleep 3
hyprctl dispatch workspace 10
hyprctl dispatch exec kitty "\~/Videos/"
\## the problem here is that when I try to use this noscript fresh start (as in after booting)
\#but works after starting tmux instance other things work
thanks for you'r help in advance
https://redd.it/1pcwa64
@r_bash
\#!/bin/bash
\#python study workspace
hyprctl dispatch workspace 1
hyprctl dispatch exec "kitty -e sh -lc '/usr/bin/tmux a -t cs50p || /usr/bin/tmux exec bash'"
sleep 2
hyprctl dispatch exec brave "https://www.youtube.com/playlist?list=PLhQjrBD2T3817j24-GogXmWqO5Q5vYy0V \\
https://cs50.harvard.edu/python/psets/6/ \\
https://github.com/cyberseekerx"
sleep 3
hyprctl dispatch workspace 10
hyprctl dispatch exec kitty "\~/Videos/"
\## the problem here is that when I try to use this noscript fresh start (as in after booting)
\#but works after starting tmux instance other things work
thanks for you'r help in advance
https://redd.it/1pcwa64
@r_bash
I wrote a Bash wrapper for Nmap & Gobuster with HTML reporting (AlienTec Recon V2.0)
Hi r/bash,
I've been working on a project to practice my noscripting skills and automate my daily pentesting workflow. I just released Version 2.0 and would love some feedback on the code and logic.
What is it?
It's a native Bash noscript that orchestrates Nmap (Port scanning) and Gobuster (Directory forcing) into a single flow. It parses the output and generates a clean HTML report at the end.
The Script Features:
🐧 Pure Bash: Runs natively on Linux (Kali/Parrot) without Python dependencies.
🚀 Orchestration: Handles background processes for scanning.
📄 Reporting: Uses `cat` and heredocs to generate a styled HTML report.
🔍 Logic: Automatically detects if the target is internal or external to adjust scan intensity.
Repository:
https://github.com/AlienTec1908/AlienTec-Recon-Tool
I'm open to code reviews! If you see any bad practices or ways to optimize the loops/arrays, let me know.
Thanks!
https://redd.it/1pecxw3
@r_bash
Hi r/bash,
I've been working on a project to practice my noscripting skills and automate my daily pentesting workflow. I just released Version 2.0 and would love some feedback on the code and logic.
What is it?
It's a native Bash noscript that orchestrates Nmap (Port scanning) and Gobuster (Directory forcing) into a single flow. It parses the output and generates a clean HTML report at the end.
The Script Features:
🐧 Pure Bash: Runs natively on Linux (Kali/Parrot) without Python dependencies.
🚀 Orchestration: Handles background processes for scanning.
📄 Reporting: Uses `cat` and heredocs to generate a styled HTML report.
🔍 Logic: Automatically detects if the target is internal or external to adjust scan intensity.
Repository:
https://github.com/AlienTec1908/AlienTec-Recon-Tool
I'm open to code reviews! If you see any bad practices or ways to optimize the loops/arrays, let me know.
Thanks!
https://redd.it/1pecxw3
@r_bash
GitHub
GitHub - AlienTec1908/AlienTec-Recon-Tool: AlienTec-Recon-Tool
AlienTec-Recon-Tool. Contribute to AlienTec1908/AlienTec-Recon-Tool development by creating an account on GitHub.
Llib - I created a Bash library with argument parsing, finally and much more
I’ve been playing with Bash for a few years now. Every time I ran into something that I feel is missing, I try to hack together a solution. After enough time this turned into a whole library: [https://kamilcuk.github.io/L\lib/](https://kamilcuk.github.io/Llib/) . Few modules changed how I write Bash.
[L\argparse](https://kamilcuk.github.io/Llib/section/argparse/) has argument parsing with interface like Pythons argparse. I never liked existing argument parsing libraries in Bash, so I wrote my own (yay!). It generates helps, has shell completion, colors, subparsers, function subparsers and more.
[L\finally](https://kamilcuk.github.io/Llib/section/finally/) allows to register a cleanup function that is always run on noscript exit. Or on the current function return, whichever comes first. Functions can nested, each function call has own cleanups. Finally a useful use of the RETURN trap, that trap is shared between all Bash functions. This ended up being more useful then I expected.
[L\setx](https://kamilcuk.github.io/Llib/section/stdlib/?h=lsetx#Llib.sh--Lsetx) just enables
L\_print\_traceback prints the traceback similar to Python. I found this post ages ago. I like using
The project grew far larger than I intended, partly as my like research project if it is possible to implement Bash standard library. I doubt it is finished. There are probably many more bugs. Either way, I use parts of the library daily within my noscripts.
Full source: https://github.com/kamilcuk/L\_lib/ . That's all, live long and have fun.
https://redd.it/1pfmzot
@r_bash
I’ve been playing with Bash for a few years now. Every time I ran into something that I feel is missing, I try to hack together a solution. After enough time this turned into a whole library: [https://kamilcuk.github.io/L\lib/](https://kamilcuk.github.io/Llib/) . Few modules changed how I write Bash.
[L\argparse](https://kamilcuk.github.io/Llib/section/argparse/) has argument parsing with interface like Pythons argparse. I never liked existing argument parsing libraries in Bash, so I wrote my own (yay!). It generates helps, has shell completion, colors, subparsers, function subparsers and more.
[L\finally](https://kamilcuk.github.io/Llib/section/finally/) allows to register a cleanup function that is always run on noscript exit. Or on the current function return, whichever comes first. Functions can nested, each function call has own cleanups. Finally a useful use of the RETURN trap, that trap is shared between all Bash functions. This ended up being more useful then I expected.
[L\setx](https://kamilcuk.github.io/Llib/section/stdlib/?h=lsetx#Llib.sh--Lsetx) just enables
set -x for one command and then unsets it. Stupidly simple, insanely useful, I am surprised how often I slap "L_setx", because it unsets -x automatically, making the output clearer. There is also L_unsetx.L\_print\_traceback prints the traceback similar to Python. I found this post ages ago. I like using
set -e and trap ERR and printing traceback on error. Plus helpers like L\_assert L\_panic very simple function, I think everyone implements something like this.The project grew far larger than I intended, partly as my like research project if it is possible to implement Bash standard library. I doubt it is finished. There are probably many more bugs. Either way, I use parts of the library daily within my noscripts.
Full source: https://github.com/kamilcuk/L\_lib/ . That's all, live long and have fun.
https://redd.it/1pfmzot
@r_bash
Help
Hello!
I am a young developer from India , developing for a startup , can anybody tell me how may I customize whole linux gui with my own writen HTML , CSS and JS code, how to connect them with my backend, I want to run my own gui in top of gnome of linux mint , please help me. I don't have a lot of experience but a very curious and creative mind..plz help
https://redd.it/1pft0zq
@r_bash
Hello!
I am a young developer from India , developing for a startup , can anybody tell me how may I customize whole linux gui with my own writen HTML , CSS and JS code, how to connect them with my backend, I want to run my own gui in top of gnome of linux mint , please help me. I don't have a lot of experience but a very curious and creative mind..plz help
https://redd.it/1pft0zq
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
throt: bash utility for delay a cli command and run it only once
https://github.com/hmepas/throt
Mac OS X installation thru brew:
brew tap hmepas/homebrew-throt
brew install throt
Or just download
curl -o ~/bin/throt https://raw.githubusercontent.com/hmepas/throt/refs/heads/main/throt && chmod +x ~/bin/throt
(or whatever)
Usage example:
throt --delay 5 yabairearrangespaces.sh
What's the idea. I.e. I have a yabai trigger for changing display layout (adding 2nd monitor or removing it) the problem is this trigger is noisy for comming out of sleep it could be fired several times, first for removing monitor and second for adding it back again when OS recognize it's have one. Also I do not need to run my rearrange displays noscript imideately, since I need to give system itself time to react and yabai time to adjust first. Also there is no reason to run this rearranging twice, first there are possibly be race condition and secondly it's just don't neccessary. So i wrote a simple bash noscript which on the first run create a lock file and detached proccess with sleep <sec> inside. After sleep is done the command is fired. And all calls before that will be just dissmissed for that particular command.
Enjoy!
https://redd.it/1pfn0si
@r_bash
https://github.com/hmepas/throt
Mac OS X installation thru brew:
brew tap hmepas/homebrew-throt
brew install throt
Or just download
curl -o ~/bin/throt https://raw.githubusercontent.com/hmepas/throt/refs/heads/main/throt && chmod +x ~/bin/throt
(or whatever)
Usage example:
throt --delay 5 yabairearrangespaces.sh
What's the idea. I.e. I have a yabai trigger for changing display layout (adding 2nd monitor or removing it) the problem is this trigger is noisy for comming out of sleep it could be fired several times, first for removing monitor and second for adding it back again when OS recognize it's have one. Also I do not need to run my rearrange displays noscript imideately, since I need to give system itself time to react and yabai time to adjust first. Also there is no reason to run this rearranging twice, first there are possibly be race condition and secondly it's just don't neccessary. So i wrote a simple bash noscript which on the first run create a lock file and detached proccess with sleep <sec> inside. After sleep is done the command is fired. And all calls before that will be just dissmissed for that particular command.
Enjoy!
https://redd.it/1pfn0si
@r_bash
GitHub
GitHub - hmepas/throt
Contribute to hmepas/throt development by creating an account on GitHub.