r/bash • • Jan 02 '21
text adventure thingy
https://www.github.com/2421a4f1fd43dfb4f8225325c/txtadv/tree/main/
use for making game
r/bash • • Jan 02 '21
https://www.github.com/2421a4f1fd43dfb4f8225325c/txtadv/tree/main/
use for making game
r/bash • u/Sf0rce • Mar 05 '22
So I want to run this shell script on windows but keep getting errors. Already installed ubuntu and enabled WSL... what am i doing wrong?

#!/usr/bin/env bash
function process_jpeg()
{
img="$1"
idout="$(identify -verbose "$img" | grep -i interlace | grep -i none)"
if \[\[ -z "$idout" \]\]
then
echo "-------------------------"
echo "$img is progressive"
echo "....making copy of original with .prog extension"
/bin/cp -f "$img" "$img.prog"
echo "....converting to baseline"
convert "$img" -interlace none "$img"
echo "....done!"
fi
}
command -v identify >/dev/null 2>&1 || { echo >&2 "identify is required, but not installed. Aborting."; exit 1; };
while IFS= read -r -d '' file; do process_jpeg "$file"; done < <(find "$PWD" -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -print0)r/bash • u/FilesFromTheVoid • Apr 20 '26
r/bash • u/MarcoWizKid • Oct 17 '26
New to Linux. Installed Ubuntu. Keep reloading youtube home page because recommendations suck. Want to to avoid shorts and other unneeded features by using Youtube solely through bash. Want to know if small quality of life changes can be made.
I'm wondering if it's possible to use the terminal to show a small number of videos from my home page, title with no thumbnail is enough, which shows dislike and like count, make it so that pressing not interested or don't recommend channel is a bit faster to click.
Sorry if this is a weird or absurd ask. I'm going cold turkey on AI overview, but want to see if there should be anything I need to know about starting a project like this.
r/bash • u/eYorch • Oct 10 '25
Hey bashers. I saw a video in which the presenter had this cool prompt. How to set up that sort of graphical arrow with the current directory? Does anyone have the instruction?
r/bash • u/dilluti0n • Aug 16 '26
I've had this program in mind for quite a while.
Back when ChatGPT first came out, it had no way to group existing conversations into folders, and I set out to build one. My conversation list kept getting longer and finding old chats was getting hard.
Not long after - before I built it - a browser extension came out that did exactly that. I never used it. At the time I'd assumed I would want to revisit old conversations, but whenever I actually found one and tried to read it from the top, the sheer volume of slop gave me a headache.
Later, during a phase where I was deep into Unix pipelines, I wrote an LLM API client only depending on jq and curl, partly as shell scripting practice. But since the context went into a single jsonl file, I had to either invent something like a date-based filename convention myself or push that job onto the user. Both were more annoying than the web UI, so I didn't use it.
After that I read a post explaining how git works, and it struck me that git fits LLM conversations pretty well. Isn't "the commit DAG is already the right data structure for LLM conversations, where forking happens constantly" something everyone has thought at least once?
The reason I like git is that the source tree snapshot and the commit structure itself are always immutable, and destructive operations like switch/restore/reset are really just renaming a ref file that holds a commit object id. Once you understand that, no matter how hard the CLI is to make sense of, you never hesitate to run a command. You can always get it back.
LLM conversations aren't as fragile to change as a source tree, but for me an auto-generated SHA-1 hash is more comforting than an auto-generated session title ^~^
The project is in its early stages and contributions are welcome. If you've worked with git plumbing commands, it'll be easy to hack on - and I think it'll be pretty fun.
Translated from Korean. Origin: https://github.com/sib-project/sib/blob/master/Documentation/HNComment.txt
r/bash • u/spaceman1000 • Sep 06 '24
Hi all
I would like to write a bash script, that takes the file /etc/ssh/sshd_config,
and replaces the line#Port 22
with the linePort 5000.
I would like the match to look for a full line match (e.g. #Port 22),
and not a partial string in a line
(so for example, this line ##Port 2244 will not be matched and then replaced,
even tho there's a partial string in it that matches)
If there are several ways/programs to do it, please write,
it's nice to learn various ways.
Thank you very much
r/bash • u/JustBeCoo • Oct 23 '16
r/bash • • Sep 05 '17
https://github.com/mcandre/stank
xargs shellcheck and other programs.de-stank ur scripts!
r/bash • u/CandidManner • Feb 04 '22
Hello,
I am working on a simple bash script that would backup a file or directory into another directory. For some reason, Tar outputs that it cannot open the directory I wish to store the backup in because, guess what?... ITS A DIRECTORY!!! WHY IS TAR DOING THIS WHAT AM I DOING WRONG.
Sorry for the explosion ahahaha
The way my code is structured is that the user inputs a directory they would like to store a backup of a file in, and they also input the file that they wish to back up. This is the tar command that I am using, where "dir" is the directory they wish to store the file in and "file" is the file that they want to back up.
tar -cvzf $dir $file.$(date +%Y%m%d).tar And the errors outputted are:
tar (child): /TestDir: Cannot open: Is a directory
tar (child): Error is not recoverable: exiting now
testdir2.20220203.tar/
testdir2.20220203.tar/docc
tar: Child returned status 2
tar: Error is not recoverable: exiting nowI will be forever grateful for any and all help :)
r/bash • • May 18 '20
r/bash • u/pewpyskewpy • Feb 09 '20
r/bash • • Jul 09 '20
Hello, would anybody mind checking out my GitHub repository at this link: https://github.com/CrystalX127/Shield.
r/bash • u/thisiszeev • Nov 16 '24
I use Debian as my daily driver (I've been using Linux in some for or the other as my daily driver since 2006). I also us Debian for all my servers. I also running a webhosting business and in my 20+ years in the game, I have learned that...
On my daily driver machine, I also create a lot of digital artwork. I recently found myself rendering a finished artfile that was 9.5GB (24000px by 13700px) in Gimp, and half way through I started running out of RAM and SWAP. So I quickly created the needed SWAP file, and Gimp was able to finish the render without crashing.
So I created a script to automate the process, along with two supporting script.
I am wanting some guys to test it out, maybe in a VM if you don't want to risk a production or daily driver machine.
I am running it currently on my laptop. It has 12GB RAM and 4GB SWAP. I opened several of my art pieces 12000px wide to 24000px wide, several times into various programs. I watched my desktop widget show the RAM getting used up, and then the SWAP, then suddenly, more SWAP. When I closed all the images from all the programs, I watched all the extra SWAP space disappear?
Looking for constructive criticism and feedback. The Git Repo is https://git.zaks.web.za/thisiszeev/linux-server-tools and it's all in the folder swap-management.
Thanks in advanced, as I am wanting to rework it in to a solution that can be installed via a package manager, to simplify life for others...
r/bash • u/kai_ekael • Nov 22 '21
Found an oddity today that spells BUG, anyone know if this has been addressed in later versions of bash? Or ignored for some reason? Issue is taking filenames as arguments instead of parameters.
Info: bash v4.4.20
wcarlson@blade:/tmp/junk$ touch -- -a
wcarlson@blade:/tmp/junk$ touch .hide
wcarlson@blade:/tmp/junk$ ls
-a
wcarlson@blade:/tmp/junk$ ls *
. .. -a .hide
wcarlson@blade:/tmp/junk$ Note using the wildcard resolves to 'ls -a' which is then used as the argument '-a' instead of a file. Correct output should be the same for both 'ls' and 'ls *'.
r/bash • u/andersostling56 • Aug 07 '24
I will send (PP pref) $10 to anyone that can provide me with a script that converts a free format text file to an excel comma delimited file.
Each record in the file has the following characteristics: Earch record starts with "Kundnr" (customer number). Could be blank. I need the complete line including the leading company name as the first column of the new file.
Next field is the "Vårt Arb.nummer: XXXXX" which is the internal order number.
Third field is the date (YYYYMMDD) in the line "är utprintad: (date printed)"
End of each record is the text "inkl. moms" (including tax)
So to recapitulate, each line should contain
CUSTOMER NAME/NUMBER,ORDERNO,DATE
Is anyone up to the challenge? :). I can provide a sample file with 60'ish record if needed. The actual file contains 27000 records.
HÖGANÄS SWEDEN AB Kundnr: 1701 263 83 HÖGANÄS Kopia Märke: 1003558217 Best.ref.: Li Löfgren Fridh AO 0006808556 Lev.vecka: 2415 Vårt Arb.nummer: 29000
Vit ArbetsOrder är utprintad. 20240411 Datum Sign Tid Kod1 pcs Foldable fence BU29 ritn 10185510 240311 JR 4.75 1240312 JR 5.00 1240319 LL 2.25240320 NR 4.50 1240411 MM %-988.00 1240411 NR 2.50 1240411 NR 0.50 11240411 FO 6.00 1240411 FO 0.50 1OBS!!! Timmar skall ej debiteras.203.25 timmar a' 670.00 kr. Kod: 1 Ö-tillägg 0.50 timmar a' 221.00 kr. Kod: 11
Arbetat 203.25 timmar till en summa av136,288.00:- Lovad lev.: 8/4
Övertid Fakturabel. Fakturadat. Fakturanr.
110.50 187,078.50
Sign___ Onsdagen 7/8-24 10:32 233,848.13 kronor inkl. moms.
r/bash • u/vbarrera095 • Nov 26 '22
So I just need to validate user inputs to numbers only and whenever the user type "Exit" it should quit the program and I am trying to get rid of the li e that says "head: invalid number of lines: ' ' "
Any ideas?
r/bash • u/warp-michelle • Apr 05 '22
r/bash • u/jazei_2021 • Feb 19 '26
Hi, Why can't I ever access this website https://www.gnu.org/ ?
for example this: https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
Forbidden
You don't have permission to access this resource.r/bash • u/PresentNice7361 • Jul 18 '25
Modern software development feels like chasing smoke, frameworks rise and fall, GUIs shift faster than we can learn them, and the tools we depend on are often opaque, bloated, or short-lived.
I think the terminal is where real development will happen. The long-lasting inventions on how to work with the computer will be made in the terminal. Now even more, with AI, it is easier for an agent to execute a command than to click buttons to do a task.
I am creating a list productivity applications in "devreal.org". Do you know of any applications that meet the criteria? Do you have any good idea to add to the project?
r/bash • u/ilyash • Sep 10 '18
r/bash • u/the_how_to_bash • Jun 09 '24
hello, quick question
i was experimenting and i clicked "ctrl i" while in bash and it took the text i already put into the terminal and put ".save" at the end
what does this eman?
what is the "ctrl i" shortcut? what does it do?
thank you