92,899 questions
-1
votes
1
answer
143
views
Determine target platform without installing Rust [closed]
TL;DR: how can I determine the Rust target platform triple without installing Rust or Cargo?
I would like to download the appropriate pre-compiled binary program file. The pre-compiled binary program ...
1
vote
1
answer
86
views
gcc gfortran compiler does not recognize blank spaces inside filenames
Is there a way to enforce the execution of the Fortran compiler contained in gcc-16.1.0-64 to recognize a blank space in a filename when executed in the Windows cmd.exe command line?
Others, like the ...
0
votes
0
answers
45
views
Error rebuilding Spotlight indices with shell script
Spotlight wasn't finding stuff I knew was there, so I ran this Applescript:
do shell script"sudo mdutil -Ea"with administrator privileges
and got this error:
Error: CoreSpotlight reset ...
2
votes
3
answers
145
views
Rexexp fails when in Bash script
There is a string I've extracted from a zip file:
866275 2016-02-06 11:25 Documents/familystuff/Household/Agri Stuff/Sheep/sheep Photos/2014 ewe lambs/074Cleo 6Feb16a.jpg
I want the first field (...
Best practices
0
votes
2
replies
60
views
Is it possible to set-up a build setting from a pre-action/build phase in Xcode?
I'm not sure what's the best practice around here but essentially the problem I have is I want to have a tool that generate a path (an unix domain socket) and set it in ...
Tooling
0
votes
8
replies
240
views
Python `.split()` for Bash?
With Python it's gorgeously simple, my problem is instantly solved in one method:
text='''
dab
a
b
c
dab
e
f
g
dab
h
i
j
'''
print(text.split('dab'))
Nevertheless, doing everything in Bash is a ...
Advice
0
votes
3
replies
97
views
What is the <> token in bash
I am doing a project where I must simulate a small shell, the tokens I need to recognize and interpret as bash are:
<
>
>>
<<
|
I have understood the use and purpose of each of them ...
Advice
0
votes
2
replies
113
views
Is a fish shell variable just a string separated with spaces?
The docs say that all variables are lists, and I thought that meant they had some special internal structure that was outside the scope of the shell interface. Like, how the , in the python list [1,2,...
0
votes
1
answer
115
views
In shell pipes, maintaing resilience against orphaned process and buggy applications
Further note: The inconsistencies have been identified as due to an interface change in the tool, less that breaks backward compatibility. Beginning with version 603, it is required to provide the ...
1
vote
1
answer
145
views
Permission denied when running executable with systemd [closed]
On my Raspberry Pi 5 (64 bit) I'm trying to run a command via a python script, using systemd to start it at boot. The chain goes like this:
ids.service in /etc/systemd/system/:
[Unit]
Description=IDs
...
1
vote
1
answer
144
views
tput command will fail when redirecting stderr to /dev/null inside a command substitution
Running tput cols inside a command substitution, while redirecting stderr always make it fallback to 80.
Unless I redirect it to a terminal device file
tput cols # Output: actual ...
2
votes
2
answers
177
views
Why does this function see only 2 values when I send an associative array and 3 values when I send a normal array?
This is my function
#!/usr/bin/env bash
function run_aws_ssm_delete_parameters() {
local -r enable_logging="$1"
local -n parameter_names="$2"
shift 2
local -a ...
3
votes
1
answer
167
views
How to properly quote associate array subscripts in Bash?
If I declare an associative array in Bash, and then want to reference an element using a subscript which is a variable whose value contains spaces, when and how should I quote the variable name I am ...
2
votes
0
answers
98
views
How to include feature of using arrows to navigate through previous commands [closed]
I am making a shell orchestrator in C which connects with other devices and controls connected systems using an IP address. I am having difficulty in adding the feature to use arrow keys to navigate ...
Advice
0
votes
9
replies
90
views
Most efficient way to determine if a file exists only with a given extension
I have a little problem to crack that turns out to be less trivial than I thought - even to formulate as a question for the title of this ticket, in fact!
Here's the background: I mount my iPhone via ...
