r_bash – Telegram
Running group of processes parellel, wait till last is finished

I have the following problem and the following bash noscript. I need to execute the command on ln 1, wait and then execute the commands on ln3 and 4 parallel. After finishing those the command on ln 5, wait and then the commands on ln6 and 6 in paralelle:

[1] php -f getCommands.php
[2] [ -f /tmp/download.txt ] && parallel -j4 --ungroup :::: /tmp/download.txt
[3] [ -f /tmp/update.txt ] && parallel -j4 --ungroup :::: /tmp/update.txt
[4]
[5] php -f getSecondSetOfCommands.php
[6] [ -f /tmp/download2.txt ] && parallel -j4 --ungroup :::: /tmp/download2.txt
[7] [ -f /tmp/update2.txt ] && parallel -j4 --ungroup :::: /tmp/update2.txt

Without success, i tried the following:

put an & after line 2,3,6 and 7, this will start the command on line 5 prematurely.

Brackets, no effect:

php -f getCommands.php
{
[ -f /tmp/download.txt ] && parallel -j4 --ungroup :::: /tmp/download.txt
[ -f /tmp/update.txt ] && parallel -j4 --ungroup :::: /tmp/update.txt
} &

writing the parallel commands in two different txt files and call them with parallel, but this just makes the noscript so much less maintanable for such a simple problem.

Anyone has some good pointers?

https://redd.it/1m7fbcr
@r_bash
I have created a (subnoscript) translator for YouTube videos using only bash.

Why?

For some reason, YouTube's automatic translator hasn't been working for me, and the translation quality is usually not good. Anyway, this transcribes using Whisper-1 and translates using OpenAI's GPT.

What does the noscript do?

* It downloads the video
* Creates an ogg audio (ogg allows trannoscription of long videos due to its small size)
* Transcribes the audio with Whisper
* Simultaneously translates the subnoscript file (.srt) based on a Chunk\_Size
* Merges the new translation with the video, creating an MKV

How to use?

`this_noscript_file youtube_url [output_dir]`

*Note: I really didn't write this for anything beyond personal use, so don't expect anything stable or user-focused. I'm just sharing it in case it helps someone and they want to take a look at the noscript. If anyone wants to improve it, I will gladly accept any PR.*

*kinda 100 lines of bash code*
[https://gist.github.com/kelvinauta/0561842fc9a7e138cd166c42fdd5f4bc](https://gist.github.com/kelvinauta/0561842fc9a7e138cd166c42fdd5f4bc)


https://redd.it/1m7rold
@r_bash
Building A Privacy-First Terminal History Tool

After losing commands too many times due to bash history conflicts, I started researching what's available. The landscape is... messy.

The Current State:

Bash history still fights with itself across multiple sessions
Atuin is great, but it sends your commands to their servers (raising privacy concerns?)
McFly is looking for maintainers (uncertain future)
Everyone's solving 80% of the problem, but with different trade-offs

What I'm Building: CommandChronicles focuses on local-first privacy with the rich features you want. Your command history stays on your machine, syncs seamlessly across your sessions, and includes a fuzzy search that works.

The goal isn't to reinvent everything - it's to combine the reliability people want from modern tools with the privacy and control of local storage.

Question for the community: What's your biggest pain point with terminal history? Are you sticking with basic bash history, or have you found something that works well for your workflow?

Currently in early development, but would love to hear what features matter most to developers who've been burned by history loss before.

https://redd.it/1m7wmmm
@r_bash
🚀 Auto Install Docker, Portainer, Caddy & n8n — with One Bash Script!
https://redd.it/1m7z4y1
@r_bash
I expected 55 but I got 0+1+2+...

bash-3.2$ total=0

bash-3.2$ for i in {1..10};

\> do

\> total=$total+$i

\> done




bash-3.2$ echo $total

0+1+2+3+4+5+6+7+8+9+10

https://redd.it/1m7rz71
@r_bash
I built a GTK-based Bash Script Manager in C#/.NET, run and manage your bash noscripts with a simple GUI

i built an bash noscript manager if anyones interested

https://github.com/Samoreilly/BashScriptManager

https://redd.it/1m84mxd
@r_bash
Simple question about # shellcheck source=/path

Hi,
I have started using shellcheck today in VS Code using the Bash IDE extension, and my beginners' question is: how to make it recognize functions defined in another file without actually 'sourcing' the file? The problem is, shellcheck can't understand that I'm using a non-conventional function for sourcing the file which itself is defined somewhere else. Let's say that's called mysource. So I'm doing

# shellcheck source=../utils/myfunctions.bash
mysource myfunctions # let's just assume this sources the myfunctions.bash after preparing the correct file path.

The problem is, shellcheck is adamant on not recognizing (/auto-completing etc.) unless I use the official "source" or "." for the file with its full path. What's even the point of the comment if I really have to do that? If I really had to give the full path of the file with "source" or ".", then it works regardless of my writing the shellcheck source directive or not. I have also created the ~/.shellcheckrc file and placed external-sources=true in that. I have even reproduced this problem in a very small sample folder with just two files in the same directory. Without officially sourcing it doesn't want to recognize the functions... How to fix that?

https://redd.it/1m916h3
@r_bash
Built Blade — A Clean Bash Tool to Download YouTube Videos from Terminal (No Ads, No GUI)
https://redd.it/1m91wto
@r_bash
Ghostty terminal not opening new tabs in same directory — Bash + Starship issue?

I’m using Ghostty terminal on macOS with the Starship prompt and Bash. In most other terminals (like iTerm2 or Alacritty), when I open a new tab, it starts in the same working directory as the previous one. But in Ghostty, new tabs always start in my home directory, even though Ghostty is supposed to support OSC 9;9 to inherit the working directory. I’ve set PROMPT_COMMAND='printf "\\e\]9;9;%s\\a" "$PWD"; starship_precmd' at the end of my .bashrc, and verified it’s there by checking echo "$PROMPT_COMMAND". I’ve also tried disabling Starship entirely and just using the Ghostty escape sequence on its own, but new tabs still open in \~. I’m on the latest version of Ghostty (via Homebrew). Manually running the escape sequence doesn’t seem to help either. Has anyone gotten directory tracking to work properly in Ghostty with Bash and/or Starship?

https://redd.it/1m8b2s7
@r_bash
I made a noscript that lets you play YouTube directly from your terminal

https://github.com/yatharthgeek/yt-play
This is the noscript and I want you guys to review it make it a little better cause it's super ugly and basic and sometimes fails.

https://redd.it/1maoh8e
@r_bash
'\r': command not found

Hello group, I am sure this is a total newbie to bash question, but I tried adding logging to a simple rclone backup noscript and I do not understand the error, because there is no "\\r" in the noscript. The rclone synch runs successfully.

The noscript:

#!/bin/bash

LOG_FILE="/var/log/backup.log"

log() {

echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" >> "${LOG_FILE}"

}

log "Starting the noscript"

rclone sync -v --create-empty-src-dirs /$HOME/Documents Google:Documents

log "Script completed successfully"

Result including cat to verify the noscript run:

>barry@barryubuntu:\~/sh$ sudo bash backup.sh

>[sudo\] password for barry:

>backup.sh: line 3: $'\\r': command not found

>backup.sh: line 4: syntax error near unexpected token `$'{\\r''

>'ackup.sh: line 4: `log() {

>barry@barryubuntu:\~/sh$ cat backup.sh

>\#!/bin/bash

>LOG_FILE="/var/log/backup.log"

>log() {

>echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" >> "${LOG_FILE}"

>}

>log "Starting the noscript"

>rclone sync -v --create-empty-src-dirs /$HOME/Documents Google:Documents

>log "Script completed successfully"

>

As I said the rclone synch is working, I am just trying to get backup to Google drive like I had in Windows before switching to Ubuntu a few months ago. But logging sure would be an easier way to make sure it is functioning. This logging piece I simply copied from a lesson in bash noscript logging. Thanks all.



https://redd.it/1maxlgw
@r_bash
Need help making a noscript for file decoding

So I’m not good at coding whatsoever. But I’m trying to streamline the process of decoding a non-compatible surround audio file to a .wav file with dolby reference player. Asked chat gpt but the ponctuation is so damn confusing. The commands for this process are:

drp “input file path” --ac4dec-dmx-mode hp --ac4dec-drc-enabled false --ac4dec-out-ref-level 0 --ac4dec-limiter-enabled false --ac4dec-pres-index 1 --audio-out-file ‘input file name’.wav

Could yall please help me figure out how do I make a noscript so that I’ll just have to input the .ac4 file and let it do its thing? Appreciate yall in advance. Sorry for the formating, posting on a phone.

https://redd.it/1mbb23k
@r_bash
Question about Docker usage in a bash noscript

Hey, im a total beginner to bash noscripting, so sorry for potentially noob question. Recently I decided to write a simple noscript for automatically converting and sending ebooks to my e-reader using Calibre's utilities. It also utilizes secret-tool for safely storing mail credentials.

In such a scenario, would it be better to demand users to install Calibre locally, or containerize my noscript via Docker? The second option seems a bit excessive for a noscript consisting of two small files but I'm not sure what are the standard solutions in such scenarios. Also it's my first time using Docker so I'm a bit lost.

Thanks in advance!

https://redd.it/1mbre2x
@r_bash
Question about Docker usage in a bash noscript

Hey, im a total beginner to bash noscripting, so sorry for potentially noob question. Recently I decided to write a simple noscript for automatically converting and sending ebooks to my e-reader using Calibre's utilities. It also utilizes secret-tool for safely storing mail credentials.

In such a scenario, would it be better to demand users to install Calibre locally, or containerize my noscript via Docker? The second option seems a bit excessive for a noscript consisting of two small files but I'm not sure what are the standard solutions in such scenarios. Also it's my first time using Docker so I'm a bit lost.

Heres the noscript for anyone interested (it might not currently work on your machine, hence this post): https://github.com/Dewaszmi/send-to-kindle-noscript

https://redd.it/1mbmnf1
@r_bash
Infant's request from experts as someone who is entering the world of Bash as a tool

For context I switched to Linux 3 weeks ago on a Debian based architecture and I have fallen in love with it but I am not using to its best potential. I want to switch to arch Linux and I am currently learning by testing in on a Virtual Environment (qemu-kvm) in particular .What is the best way to go about learning bash from scratch, noscripting and eventually becoming an expert given I am also done and expecting graduation soon in electrical and telecommunications and on my research I have learnt that backbone of telecoms and Networking as a whole is Linux. Any advise is highly appreciated as I want to commit fully into learning the language and the best way is always asking the experts.

https://redd.it/1mbm6gw
@r_bash
How to clear cache and cookies across all browsers for localhost:3002?

You have a specific website localhost:3002
You have firefox, safari and chrome installed
You want to clear cache and cookies for this website across all browsers
Anyone know if this is doable with a bash noscript?

https://redd.it/1mc3c6s
@r_bash
How do fill the next prompt

Is there a command or way to make a a noscript that works like the following
$ inject "echo test"
$ echo test
without executing echo test

https://redd.it/1mc4296
@r_bash
An app that lets you view a live snapshot of your shell output

Hi,

I’m thinking about making a small app that shows a live view of your shell output — like tail -f or noscript output — in a clean, glassy overlay on your phone screen (maybe even on a widget). It’s useful for monitoring the status of running code, for instance.

Would you use and maybe pay a 1 time fee for something like that? Thanks!

View Poll

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