Skip to main content
1 vote
1 answer
36 views

YQ: load a text file as array and use it for an operation

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
0 answers
53 views

Colon in bash regex [duplicate]

I am using regex in GNU bash, version 4.4.23(1)-release (x86_64-pc-msys) (git bash). I am having an issue indicating a colon to the regex. I am looking for the following string: Date : 25 Dolahn(6) ...
Itération 122442's user avatar
2 votes
2 answers
107 views

How do I operate on continuous piped output from a bash command?

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
2 votes
4 answers
116 views

Array elements in sed operation

I am trying to replace elements on an array using a sed command to compare values between two arrays and replace them accordingly, with the following terminal input: #!/bin/bash icons=("" &...
Caio's user avatar
  • 23
1 vote
1 answer
70 views

Weird prompt rendering with custom $PS1

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
1 answer
111 views

Bash script returning whole array instead of single element

I wanted to make a CLI tool that will display a random quote (from a list of .sh scripts which show ANSI art along with said quote) and also let you filter by author. It works fine when I pick an ...
petal's user avatar
  • 23
1 vote
0 answers
60 views

UI tests blocked by “bash requesting screen access” popup in Mac OS

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
5 votes
3 answers
134 views

How to get the actual $0 as typed by the user in Bash?

When executing a Bash script from PATH, the $0 is set to some string that is equal to the full path of the executable. Consider a script in /tmp/script.sh #!/bin/bash echo "0=$0" echo "...
KamilCuk's user avatar
  • 146k
0 votes
3 answers
73 views

How can I display the colors of text inserted with color codes by another program in Bash?

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
3 votes
3 answers
172 views

git config alias function : Bad substitution

I have the following git alias function that moves files into a directory using git mv of those files and then does the git commit : [alias] mv-into-dir = "!mvIntoDIR() { \ cd ${GIT_PREFIX:-.}; \ ...
SebMa's user avatar
  • 4,945
0 votes
0 answers
73 views

Running bash script with Lua and Tup causes file permission issues

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
3 votes
6 answers
169 views

bash script use function call in string substitution

in a bash script I call an external script that gives me the status of a program, like ~/bin/status which returns something like program is running or program is halted Now I want to use only the ...
jokey's user avatar
  • 53
-1 votes
0 answers
21 views

.desktop file won’t launch Proton app on double-click (works in terminal) [migrated]

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
-1 votes
0 answers
37 views

Meson cross compile using git bash on windows

setup host: windows platform git bash Installed meson via python, python -m pip ninja-1.13.0-py3-none-win_amd64.whl/meson-1.9.1-py3-none-any.whl Want to do cross platfom compilation on a windows host ...
stefan's user avatar
  • 1
3 votes
1 answer
102 views

bash script concat() in prepared statement for mysql

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

15 30 50 per page
1
2 3 4 5
10460