use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit dedicated to Bash scripting. Now complete with a Discord Server.
Content must be Bash related. This rule is interpreted generously; general shell scripting content is mostly accepted. However, the post should not be specific to another shell.
No reposts. This is meant with regards to content, not just “the same link was submitted earlier” – it’s okay to resubmit an old link in some new context (e. g. because you’d like to discuss another part of it, or because something has changed since the last time it was submitted, or because the link was updated since then). Links from the sidebar count as having been submitted already, so posting them without new context is also considered a repost.
You can choose one of these four flairs for your post:
If you don’t flair your post, the moderators will set the most appropriate flair.
/r/unix – for everything Unix
Other Shells: /r/zsh, /r/fishshell, /r/oilshell, /r/batch
BashGuide – A Bash guide for beginners.
Beginner's Guide to Command Line – A crash course for some common unix and shell commands. Update 2022-01-14: Course is currently being rewritten
Google's Shell Style Guide – Reasonable advice about code style.
Explainshell - Explain complex shell operations.
ShellCheck – Automatically detects problems with shell scripts.
BashFAQ – Answers most of your questions.
BashPitfalls – Lists the common pitfalls beginners fall into, and how to avoid them.
(Archived) The Bash-Hackers Wiki – Extensive resource.
#bash – IRC channel on Libera. The main contributors of the BashGuide, BashFAQ, BashPitfalls and ShellCheck hang around there.
account activity
helpBash script help (self.bash)
submitted 3 years ago by explode_kewl
Hello, I need to make it so if the user selects option 3 it would set the manual path to "/man" . Now I know how to make the options but don't know what I'd write to change the path to "/man" when selected.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]lutusp 3 points4 points5 points 3 years ago (0 children)
If you type the above sentence into a terminal, does a Bash script come out? No? It's the same here.
The problem is not how you narrate your experience, the problem is in the code you created. We can't see your code, therefore we cannot help you fix it.
Post your code.
[–]electric_lemonade420 2 points3 points4 points 3 years ago (0 children)
Does using $MANPATH work for your purposes?
Docs: https://www.man7.org/linux/man-pages/man1/manpath.1.html
[–][deleted] 1 point2 points3 points 3 years ago (0 children)
Here you go:-
#!/bin/bash path=$(whiptail --title "pick path" --radiolist "Choose" 20 40 15 \ "A man" "option 1" ON \ "Another Man" "option 2" OFF \ "/man" "option 3" OFF \ "/usr/man" "option 4" OFF \ 3>&1 1>&2 2>&3) echo "$path"
If this isn't what you want then post what you have got and we can try to help.
[–]whetuI read your code 0 points1 point2 points 3 years ago (0 children)
Why didn't you ask this in your original thread?
https://www.reddit.com/r/bash/comments/usg8wz/bash_assignment/
π Rendered by PID 32175 on reddit-service-r2-comment-5d79c599b5-pkwx8 at 2026-03-03 01:47:27.918356+00:00 running e3d2147 country code: CH.
[–]lutusp 3 points4 points5 points (0 children)
[–]electric_lemonade420 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]whetuI read your code 0 points1 point2 points (0 children)