All Questions
Tagged with configuration bash
56
questions
0
votes
2
answers
143
views
Edit configuration files idempotently
When editing configuration files, such as /etc/sysctl.conf for example, it is often useful to do the update in an idempotent way, meaning that if the script is executed multiple times, you don't end ...
5
votes
2
answers
2k
views
Source not working the same way for bash as for zsh, cannot forward source commands as expected
I have been using bash at work and zsh at home, different macbooks. I know very little bash or zsh scripting, so I didn't dare do the switch until I managed to get my ZSH on par with what I had at ...
1
vote
0
answers
832
views
Docker does not trigger login or invoke /etc/profiles?
Trying to deal with the problem of
dircolors: no SHELL environment variable, and no shell type option given
when I start my docker container.
So from
What sets the $SHELL environment variable? it can ...
0
votes
1
answer
597
views
Read config(Having nested configuration)file using bash
I have a .conf file, which has data like:
category1 {
Key1="value1"
Key2="value2"
}
How do I read these values in bash?
1
vote
2
answers
1k
views
tmux binding a key to bash command refuses to work
I want to be able to respawn all panes in my current window that are NOT in tree-mode.
I made this script and it works:
for i in $(tmux list-panes -F "#{line} #{pane_id} #{pane_mode} #{...
1
vote
2
answers
288
views
ranger chain commands in config
I am using ranger as my terminal file manager and now that I understand the basics, I wanted to get a bit deeper into customizing the rc for my purposes. One thing I like to do is to map a command to ...
3
votes
0
answers
339
views
Ssh on unix, ssh_config file not working
I use ssh on my mac and I was deleting know hosts in the /ssh folder. Unfortunately the ssl package stopped working because of my ssh_config. I am a little unsure how to fix this, I have tried using ...
8
votes
1
answer
10k
views
Use jq to update property of object that contains other property with specific value
Using jq, is it possible to update property value of an object that contains a specific value in some other property?
In the example below I'd like to set the value of the "value" property ...
1
vote
0
answers
715
views
Create a Systemwide alias-file in ubuntu
I want to have an alias file for every user (even not yet existing). What must be the name of that file in '/etc'?
I know .bashrc is in ubuntu in /etc as bash.bashrc, However there is no skeleton file ...
1
vote
1
answer
115
views
Getting a parameter from a config file in FreeBSD
I want to make a bash file that reads a parameter from a config file. In Debian based linux it works fine by:
my.config:
MYVARIABLE=12345
my.sh:
#!/bin/bash
source my.config
echo $MYVARIABLE
But I ...
0
votes
1
answer
128
views
Neomutt Uses the Wrong Shell Even After Setting the Shell Variable
None of my aliases are working in neomutt. This prevents me from editing files in my text editor neovim. If I try I get an error sh: 1: nvim not fount indicating that the shell being used here is sh . ...
0
votes
1
answer
578
views
Characters are being displayed incorrectly in bash
I've been setting up archlinuxarm installs on my headless raspberry pis and I recently ran into an interesting problem. All of the characters []\{}| are being displayed as different characters in my ...
2
votes
2
answers
3k
views
Why can't I change my PS1 in my bash login shell?
When I ssh into this one remote system I'm unable to modify PS1. However, while I'm ssh'd in, if I start a non-login Bash, then I'm able to modify PS1. Here's my console output:
dev ~ ❯ bash --login
...
1
vote
3
answers
67
views
Relocate bash runtime files into arbitrary directory
How do you relocate bash runtime files (~/.bash_history, ~/.bashrc, etc.) to a defined directory (such as ~/.config/bash, ~/.cache/bashhistory, etc.)?
3
votes
1
answer
3k
views
Reading configuration from an openssl config file
I'm struggling to find hint or solution for reading openssl config values in a shell script. Let me provide you a bit more details.
I have an openssl.conf file with the following simplified content:
...