Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Posts tagged bash

Use for questions about scripts written for the Bash command shell.

This tag doesn't have a detailed wiki yet.

57%
+2 −1
Q&A How to write a bash function to sanitize filenames for Linux and Windows

I'm trying to write a bash function that can sanitize filenames to make them compatible with both Linux and Windows file systems. The function should perform the following operations: Replace in...

0 answers  ·  posted 18d ago by ShadowsRanger‭

Question bash
75%
+4 −0
Q&A Why does bash seem to parse `sh -c` commands differently when called via `execl`?

When I do this in a shell: $ /bin/sh -c 'echo hello world' hello world it's my understanding that I'm running a process with argv = {"/bin/sh", "-c", "echo hello world"}. That is, the quotes c...

1 answer  ·  posted 2mo ago by Emily‭  ·  last activity 2mo ago by Emily‭

Question bash execl
71%
+3 −0
Q&A What guarantees does Bash make about order of :- Parameter Expansion when it is not in POSIX mode?

I tried to check info bash but only got a copy of the man page. This is when I learned that I could apt install bash-doc to get the "full" Bash manual. After checking both the info pages and the m...

1 answer  ·  posted 2mo ago by aghast‭  ·  last activity 2mo ago by Quasímodo‭

Question bash
60%
+1 −0
Q&A Command to format code from repo into single markdown file

I'm trying to flatten a repository of Python code into a Markdown file where each file is formatted like: relative/path/to/file1.py # contents of file1.py I'm using this command: find . -name...

2 answers  ·  posted 6mo ago by ShadowsRanger‭  ·  last activity 3mo ago by Michael‭

Question bash
81%
+7 −0
Q&A How to use grep to print only specific word from a string

I have a variable that contains a string: $CCSR = "branches/features/arm_and_musl" I want to get only the part after the last /. In this case it's "arm_and_musl" but it can be anything. So som...

3 answers  ·  posted 2y ago by Megan‭  ·  edited 2y ago by hkotsubo‭

Question bash shell
80%
+6 −0
Q&A How to read lines into an array in Bash

I wish to fill an array with strings, using Bash scripting. The strings are in a file, one per line. Here is what I've tried: declare -a my_array=() while read line; do my_array+=( "$line"...

3 answers  ·  posted 3y ago by LVx0‭  ·  edited 2y ago by Alexei‭

Question array bash console stdin
81%
+7 −0
Q&A What are field separators in operating-programming languages (such as Bash)?

The concept of field separator has some private cases in different operating system shells and their utilities (IFS on Bourne shell and derivates, RS on AWK and perhaps more) but I am having troubl...

1 answer  ·  posted 3y ago by deleted user  ·  edited 3y ago by deleted user

Question linux bash shell Bourne
75%
+4 −0
Q&A How to prompt a user for an expanded variable in Bash?

I work with CentOS operating system and my only shell is Bash. I want to create a script which prompts a user with a question like "What is your web application root?" The user should answer dire...

1 answer  ·  posted 3y ago by deleted user  ·  last activity 3y ago by Someone‭

75%
+4 −0
Q&A Unable to `mount` overlayfs in Docker container when inside a LXC with a ZFS pool

Summary/Context I'm currently working to improve performance and throughput of our automation infrastructure, most of which is a combination of Bash/Shell scripts, Python scripts, Docker, Jenkins,...

1 answer  ·  posted 3y ago by ghost-in-the-zsh‭  ·  last activity 3y ago by ghost-in-the-zsh‭

Question linux bash docker lxc zfs