Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
Best practices
0 votes
0 replies
33 views

I was trying to exercise with Bazel by packaging a deb package from a collection of scripts I'm writing to automate a few tasks at work. Right now, I keep them either in /usr/local/bin or \~/.local/...
Alessandro Bertulli's user avatar
1 vote
0 answers
65 views

I have a high memory program (ML) that I want to run in a tmux session. However, if the process is OOM killed, the tmux session is also shut down. I partially solved it (using the below run-bg), but ...
Awes's user avatar
  • 41
-2 votes
0 answers
39 views

Encountering an issue where the access token is not generated at the intended instance when using a Linux VM with system-assigned managed identity to retrieve secrets from Azure Key Vault. This issue ...
Shruti Salunkhe's user avatar
4 votes
4 answers
108 views

How can I map an unknown value alongside other known values in bash using an associative array, so that: #!/bin/bash array=("foo" "foo" "bar" "something else" &...
Caio's user avatar
  • 75
0 votes
2 answers
34 views

I have installed Firebase CLI on my Windows OS machine, I have activated FlutterFire CLI, and have added Dart’s global bin to my system PATH But when I run flutterfire --version command in my bash ...
JAMES's user avatar
  • 11
1 vote
1 answer
77 views

I have a bash script that turns off stdout and stderr when not run interactively (i.e. run from CRON). if [[ ! -t 0 && ! -t 1 ]]; then #echo "The script is not called ...
ballatom's user avatar
  • 199
1 vote
1 answer
72 views

I have a yaml file with an arbitrary amount of documents, and I'm trying to replace all missing namespaces for namespaceable resources with an arbitrary input one. Getting the non-namespaceable ...
Some Guy's user avatar
  • 809
2 votes
2 answers
117 views

I'm trying to write a small bash script that will take values from my mouse's horizontal scroll wheel to change my system's volume. Using this guide, I've come up with the following command to ...
SodaIsSoda's user avatar
1 vote
1 answer
79 views

The question closely follows this one, except that I did what the git-prompt.sh does myself. However, I started noticing weird rendering issues, where long lines do not wrap on the next console line, ...
mEm's user avatar
  • 397
1 vote
0 answers
71 views

On macOS, I get a system popup when running UI tests in GitHub saying: “bash” is requesting to bypass the system private window picker and directly access your screen and audio. How can I disable ...
Anusree lakshmi's user avatar
0 votes
3 answers
77 views

When the text directly contained color code for example: a="\033[0;31mRED\033[0m" echo -e $a The terminal had no problem colorizing the text in red. But when I modified the color code ...
fronthem's user avatar
  • 4,141
0 votes
0 answers
76 views

I am running a legacy C++ build env with Tup, Lua5.4 on Debian13. When I run tup, under any user (also root) there are strange file permission issues. When I debug and do and "ls -l" the ...
Coen Damen's user avatar
  • 2,109
-1 votes
0 answers
21 views

I’m creating a custom Proton-based “Windows layer” (without Steam) to run .exe files directly on Linux. Running them from terminal works fine — but double-clicking via a .desktop launcher does nothing....
Julien Pablo's user avatar
3 votes
1 answer
111 views

This gives a syntax error: read -p "entry: " entry sql="select concat('entry ', id) from mytbl where id = ?"; $mysql_conn "prepare stmnt from '${sql}'; set @id='${entry}'; ...
bungee1980's user avatar
0 votes
1 answer
100 views

My script to start the Rails server does not work when I use crontab. I have a script to monitor whether Puma is running or not, and subsequently start the Rails server in production. When I execute ...
Cleber Reizen's user avatar
3 votes
5 answers
195 views

I have this alias to format $PATH into one line per path: alias path='sed ''s/:/\\n/g'' <<< "$PATH"' I tried to specify the env var to list, like path $MANPATH but still with a ...
vulcan_'s user avatar
  • 167
1 vote
0 answers
137 views

I am working on creating an adaptive card dynamically. I have the skeleton on the card in JSON and I want to add entries to it (each entry will be a JSON object inside the "body" of the ...
moys's user avatar
  • 8,117
1 vote
8 answers
252 views

I'm trying to interact with an API which returns json and which uses pagination. Unfortunately, they don't give any indication when you're reached the end of the list, they just continue to respond ...
Jason Michael's user avatar
1 vote
2 answers
99 views

In the below shell script, I'm trying to conditionally add elements to an array which is syntactically incorrect when checked in shellcheck. #!/bin/bash echo "Hello World"; HH=1 ARR=( &...
Harry's user avatar
  • 4,138
0 votes
1 answer
62 views

I have a problem with my bash file: each time I launch the terminal, this error occurs: bash: /home/hk/.bashrc: line 125: syntax error near unexpected token elif' bash: /home/hk/.bashrc: line 125: ...
Haytham Kennouz's user avatar
0 votes
0 answers
60 views

I have a file that I'm trying to put a spool command and the dos path as the first line: To get the dos path from bash I use: CWDDOS=$(pwd | sed 's/\//\\/g' | sed 's/\\c/C:/g') and it gives me this: ...
Erik Christiansen's user avatar
0 votes
1 answer
76 views

This question is similar to LaunchAgent doesn't run shell script, but the solutions there didn't work for me as my situation is presumably much more complex. I have the following Bash script: #!/...
Kenny83's user avatar
  • 931
0 votes
0 answers
81 views

I can't figure out why this code outputs VAR= when it should output VAR=val. Any ideas? #!/usr/bin/env bash arr=( "export VAR=val" "echo VAR=$VAR" ) for it in "${arr[...
niXman's user avatar
  • 93
0 votes
0 answers
85 views

Associative array appears to behave differently when nullglob is set: shopt -u nullglob unset aya declare -A aya aya["10"]="hi" echo ${#aya[@]} unset aya["10"] echo ...
programmer's user avatar
0 votes
0 answers
65 views

I have a bash script where I use the read command twice: 1st usage: read text file line by line 2nd usage: asking user in the loop to confirm something However, the second usage is completely ...
zappee's user avatar
  • 23.2k

1
2 3 4 5
3138