r_bash – Telegram
What is the best task project manager

I love the terminal. I have made it so I can do everything that isn't media rich in the terminal. I however keep struggling with one thing.

Project/task manager. I love the concept of task warrior and its super solid, but where I struggle is it doesn't really offer a good hierarchy. Yes I know about the subject.sub.sub but it doesn't lay it out in a clean way. Any suggestions?

https://redd.it/1nhxwzl
@r_bash
Questions about github workflow

Warning... Github newbie here... I finally got a github account going; I was ready to give up at one point. My current problem...
- I want to pull down a skeleton repo
- Throw in some text files, including an executable noscript
- Update and push the files to the repo and save changes

- The repo is https://github.com/NoAcadia3546/bash-conway-life/releases/tag/v0.1.0-alpha (it's public)
- On my desktop PC (linux) I'm in directory ~/life
- On desktop I execute

git pull https://github.com/NoAcadia3546/bash-conway-life/releases/tag/v0.1.0-alpha

...and I get the error message...

fatal: not a git repository (or any of the parent directories): .git

Did I not "finish" the repo, somehow? A separate question about "form"... should README.md contain the full documentation, or should it include a pointer to another file called "readme.txt"?

https://redd.it/1ni3faq
@r_bash
any reference about gtrash cmd?

Hi, I don't understand the use of trash-restore cmd, I don't understand where I should BE at the moment of restoring a file: in the destiny path of a file to be restored or in any other place. I don't understand how to get the numbered list of file....

May be this another cmd helps me: https://github.com/umlx5h/gtrash?tab=readme-ov-file

Thank you and Regards

https://redd.it/1niefrk
@r_bash
How can I convert all videos in a directory from webm to kmv using ffmpeg

this is the command to convert a webm to mk format is something like this

ffmpeg -i input.webm -c:v copy -c:a copy -c:s srt output.mkv

How do I do that to all the videos in a directory. Also, I would want the output to be the original file name, and the only change being the extension

https://redd.it/1nio4ow
@r_bash
Project Rating

Hi,

I found a problem few months ago, I believe it was on this sub.

The problem was that he needs to convert .md files into standalone .md files, by including images inside the md file as base64 instead of the url, and I solve it after 1 week of the post, but I did not find the post again,

Can you tell me your opinion on the project

https://github.com/ammr01/mdpics

https://redd.it/1niptkd
@r_bash
noob NUL-delimited question

Since filenames in Linux can contain newline-characters, NUL-delimited is the proper way to process each item. Does that mean applications/noscripts that take file paths as arguments should have an option to read arguments as null-delimited instead of the typical blank-space-delimited in shells? And if they don't have such options, then e.g. if I want to store an array of filenames to use for processing at various parts of a noscript, this is optimal way to do it:

mapfile -d '' files < <(find . -type f -print0)
printf '%s\0' "${files@}" | xargs -0 my-noscript

with will run `my-noscript` on all the files as arguments properly handling e.g. newline-characters?

Also, how to print the filenames as newline-separated (but if a *file* has newline in them, print a literal newline character) for readability on the terminal?

Would it be a reasonable feature request for applications to support reading arguments as null-delimited or is piping to `xargs -0` supposed to be the common and acceptable solution? I feel like I should be seeing `xargs -0` much more in noscripts that accept paths as arguments but I don't (not that I'd ever use problematic characters in filenames but it seems noscripts should try to handle valid filenames nonetheless).

[https://redd.it/1nip6kq

@r_bash
Documentation for Bash?

Hi there! I was looking for Bash documentation, so my question is: is there any official documentation about this? If not, what’s the best docu site you recommend?

https://redd.it/1niobmh
@r_bash
How to do this process to all the videos in a directory?

I want to embed a thumbnail into mkv file. The command is something like this:

ffmpeg -i input.mkv -attach image.jpg -metadata:s:t:0 mimetype=image/jpeg -c copy output.mkv

How can I do this to all the video files in the folder? The name each video, and thumbnail is the same, except the extension(.mkv and .jpg)

https://redd.it/1njhwim
@r_bash
How to solve this issue

so i am writing a noscript where i have like n files and everyfile just contain an array of same length so i want that the noscript iterate in the folder which contain that files ( a seprate folder) and read every file in loop 1 and in nested loop 2 i am reading and iterating the array i want to update some variables like var a i want that arr[0\] always do a=a+arr[0\] so that the a will be total sum of all the arr[0\].

For better understanding i want that the file contain server usage ( 0 45 55 569 677 1200) assume 10 server with diff value but same pattern i want the variable to be sum of all usage than i want to find do that it can be use in autoscaling.

current noscript so far

\#!/bin/bash

set -x

data="/home/ubuntu/exp/data"

cd "${data}"

count=1

avg=(0 0 0 0 0 0)

cpu_usr=0

cpu_sys=0

idle=0

ramused=0

ramavi=0

ramtot=0





file=(*.txt)



for i in "${file[@\]}"; do



echo "${i}"

mapfile -t numbers < "$i"

for j in "${numbers[@\]}"; do



val="${numbers[$j\]}"

clean=$(echo " $j " | tr -d '[:space:\]')

case $j in

*usr*) cpu_usr="clean" ;;

*sys*) cpu_sys="clean" ;;

*idle*) idle="clean" ;;

*ramus*) ramused="clean" ;;

*ramavi*) ramavi="clean" ;;

*ramtot*) ramtot="clean" ;;

esac



echo "$cpu_usr $cpu_sys $idle $ramused $ramavi $ramtot"

done

echo "$cpu_usr $cpu_sys $idle $ramused $ramavi $ramtot"

(( count++ ))

done

so i am stuck at iteration of array in a file

https://redd.it/1nji0zy
@r_bash
Conway's Life Game... implemented in bash

My Gmail account shares a 15 gigabyte pool that can also be accessed via drive.google.com. I gave up fighting Github, and uploaded "life.tgz" to Google Drive. Instructions for download...
- point your web browser at https://drive.google.com/file/d/1QvJXQpM8PAXAhU6FjSkAHPacMhHWgM7n/view?usp=drivelink
- click on the "Download" icon, 3rd from the right at the top, to dowmload
- copy or move downloaded life.tgz to where ever you please (except /dev/shm)
- extract with the command "tar xzf life.tgz"
- this should create a directory named "life"
- "cd life" and read the "readme.txt" file
- if you have "
$HOME/bin" in your path, it is strongly recommended to run "./setup". This noscript will create a "$HOME/bin/ttylife" symlink, enabling you to launch the game as "ttylife seedfile", without requiring the path to ttylife.
- ttylife will run in GUI terminals (e.g. xterm) and in true text consoles
- after launching ttylife, do NOT resize GUI term windows, or resize fonts in GUI windows or text consoles. If you want a maximized term window, do it before launching the game.
- if you have an older/slower machine, it may take a second or two to update after you tap the "n" key


https://redd.it/1nk4vqe
@r_bash
epub-merge: A bash noscript to merge/split EPUB files

Just released epub-merge - a simple bash noscript that handles EPUB merging and splitting right from your terminal!

📚 Features:

- Merge multiple EPUBs into single volumes with organized TOC
- Split merged files back to originals (only epub-merge created files)
- Smart volume labeling for multiple languages (Korean, Japanese, Chinese, European languages)
- Minimal dependencies - just zip/unzip and basic shell tools
- Works on macOS and Linux
Perfect for organizing light novel series, manga volumes, or book collections! The tool automatically detects language and applies cultural-appropriate volume labels (제 1권, 第1卷, Volume 1, etc.)
GitHub: https://github.com/9beach/epub-merge

# Quick install

sudo curl -L https://raw.githubusercontent.com/9beach/epub-merge/main/epub-merge -o /usr/local/bin/epub-merge
sudo chmod a+rx /usr/local/bin/epub-merge


Would love feedback from fellow ebook enthusiasts!

https://redd.it/1nk5n4u
@r_bash
Utility dumpall — Bash CLI to dump files into Markdown for AI/code reviews

Wrote a Bash-based CLI called `dumpall` that aggregates files into Markdown.

Great for AI prompts, debugging, or just archiving.



Features:

\- Clean Markdown output

\- Smart exclusions (--exclude)

\- Copy-to-clipboard (--clip)

\- Colorized output



Works cross-platform (Linux/macOS, WSL, Git Bash on Windows).



Repo 👉 https://github.com/ThisIsntMyId/dumpall



https://redd.it/1nkknyx
@r_bash
BASH must haves?

Hello, I am somewhat new to Linux and BASH. Are there any apps, packages which are really nice to have? For example I would really appriciate some kind of autocomplete feature for typing commands. Any suggestions how to achieve this?

Thank you very much :)

https://redd.it/1nm816y
@r_bash
Multiple files as stdin?

I have a C++ program that takes a .txt file, transforms it into a matrix, then takes another .txt file and transforms that into a matrix:

    vector<vector<float>> A = convert();
    Matrix worker(A);
    vector<vector<float>> B = convert();
    Matrix auxiliary(B);

convert():

vector<vector<float>> convert(){
    vector<vector<float>> tokens;
    int row = 0;
    int col = 0;
    string line;
    string token;
    while(getline(cin, line)){
        if(line.empty()){
            break;
        }
        tokens.push_back(vector<float> {});
        while ((col = line.find(' ')) != std::string::npos) {
            token = line.substr(0, col);
            tokens[row].push_back(stof(token));
            line.erase(0, col + 1);
        }
        token = line.substr(0);
        tokens[row].push_back(stof(token));
        line.erase(0, token.length());
        col = 0;
        row++;
    }
    return tokens;
}


how would I pass two separate text files in to the program?

https://redd.it/1njmbr0
@r_bash
Generate & preview Doxygen docs with one command on Linux 🚀

I got tired of running `doxygen` and then manually opening `index.html` every time, so I wrote a tiny Bash noscript to automate it.

👉 Run one command, and it:

* Generates your Doxygen HTML docs
* Finds `index.html`
* Opens it in your default browser automaticall

Script (GitHub Gist): [https://gist.github.com/artyom-fedosov/5e4f1385716450852a3e57189b804f1e](https://gist.github.com/artyom-fedosov/5e4f1385716450852a3e57189b804f1e)

No more typing `doxygen` then manually opening `index.html`. Works on Linux, perfect for C/C++ projects.

Open to any feedback or ideas to make it better!



https://redd.it/1nms4ej
@r_bash
glrl - Green light/Red light, monitor boolean bash expressions at a glance

Sharing this hoping it can make life easier for someone out there 😊 I found myself spamming different commands to check status of things in Linux while testing some code. So I wrote this little shell noscript to simplify life. There's probably something something similar out there, but I couldn't find anything simple enough with some (very) quick googling.

https://github.com/Wesztman/glrl

I have on my todo to make it possible to input config file path.

https://redd.it/1nn1zum
@r_bash
The source command closes the terminal

I have a noscript venvs.sh:

    #!/bin/bash

BASE_PATH=/home/ether/.venvs
SOURCE_PATH=bin/activate

if [ -z "$1" ]; then
echo "Usage:"
echo "venvs.sh ENV_NAME"
exit 0
fi

if [ ! -d "$BASE_PATH" ]; then
mkdir $BASE_PATH
if [ ! -d "$BASE_PATH" ]; then
echo "BASE_PATH '$BASE_PATH' does not exist."
exit 0
fi
fi

if [ ! -d "$BASE_PATH/$1" ]; then
python3 -m venv $BASE_PATH/$1
fi

FULL_PATH=$BASE_PATH/$1/$SOURCE_PATH

if [ ! -f "$FULL_PATH" ]; then
echo "Environment '$FULL_PATH' does not exist."
exit 0
fi

source $FULL_PATH


and an alias in the .bash_aliases:

    alias venv='source /home/ether/bin/venvs.sh'


Now, when i write venv testenv, the virtual environment named testenv is created and/or opened. It works like a charm.

The problem arises, when i don't specify any parameters (virtual environment name). Then the source command closes the terminal. How can i avoid this? I don't want to close the terminal.

https://redd.it/1no0pid
@r_bash
Possible breaking changes that would actually improve bash. What's your ideas?

I'll start:

Make it so that when i can use `echo -- ...` and echo doesn't print the -- and understand it as to stop reading its options. Instead i have to use printf.

Make it so that i can provide a delimiter to echo other than a space, possibly a string instead of single character. Therefore i can do `echo --delim $'\\n' *`, because sometimes it's usefull to have the files on separate lines. Instead i currently have to do `ls` or `echo * | tr ' ' $'\\n'` in these situations.

Scoped functions/commands definitions? Making callbacks would be better if the callback command doesn't still exists when its containing command returns.

Possilibity of having bash lists inside other lists. Recursive data structures would enable many things (such as lisp).

https://redd.it/1np2dy0
@r_bash
How do I do this with bash?

I have multiple videos and images in one folder. The goal is to use ffmpeg to add thumbnails to the videos.

the command to attach a thumbnail to a single video is

ffmpeg -i input.mkv -attach image.jpg -metadata:s:t:0 mimetype=image/jpeg -c copy output.mkv

The videos named as such

00001 - vidname.mkv

00002- vidname.mkv

00100 - vidname.mkv

01000 - vidname.mkv

and etc

as you can see, I have added number prefixes with a padding of zeros to the video names. The corresponding images are named in a similar manner .

00001.jpg

00002.jpg

00100.jpg

I want to attach the images to the videos based on the prefixes.

00001.jpg is to be attached to 00001 - vidname.mkv, and so on

https://redd.it/1npapqb
@r_bash