Skip to main content

All Questions

Tagged with or
2 votes
1 answer
88 views

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 ...
Brent Pappas's user avatar
2 votes
0 answers
80 views

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 ...
Aayush Singh's user avatar
Advice
0 votes
9 replies
52 views

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 ...
RJVB's user avatar
  • 860
2 votes
1 answer
102 views

When working on a BASH exercise that is about building a simple password and account manager, I am required to add the function that allows users to retrieve an encrypted password. Below are my codes: ...
tzhou022's user avatar
3 votes
1 answer
70 views

According to the Bash manual, The TIMEFORMAT variable may be used to specify the format of the time information. For instance, if I set TIMEFORMAT to %R, then time should only print the elapsed time ...
Brent Pappas's user avatar
1 vote
1 answer
110 views

I am trying to implement a small Shell in C, one of the builtins required by my school project is cd. To do it, I use chdir to get a grip on some basics directory movement. I have read the man of cd ...
Simeon Sutarmin's user avatar
Advice
0 votes
1 replies
47 views

I’m working on a small project to build an inventory management system for hospitals that keeps track of medical equipment and supplies. The goal is to manage different types of equipment, track stock ...
Indiatopbestin reena's user avatar
0 votes
1 answer
48 views

I am investigating a possible handle leak related to Windows COM objects used from a third-party application. The application (Elipse E3 SCADA) runs VBScript code that instantiates Windows COM objects,...
Adriano Pinheiro's user avatar
0 votes
0 answers
52 views

I've searched around about how one can write a shell script (preferably cross-shell, but also in bash) that detects if it is being piped into so that it's operation can be changed accordingly. The ...
Melab's user avatar
  • 3,022
0 votes
0 answers
69 views

I need to issue a lot of, say, wget commands manually. I figured the following would make it convenient: $ sed 's/.*/wget &/g' | bash -i Indeed, stdin is now listening to my input as I copy-paste ...
iago-lito's user avatar
  • 3,266
Advice
1 vote
11 replies
131 views

I’m a macOS user and I use the Terminal while studying programming. I’m not sure whether I should be using bash or zsh. When I type bash, it switches to bash and the top bar shows “bash”, but when I ...
Kryntcode's user avatar
2 votes
1 answer
160 views

Since the subshell in the last line fails, I would have expected to see a fail. Am I missing something or is this a bug in GNU bash, version 5.3.3(1)-release (x86_64-pc-linux-gnu)? $ false; echo $? 1 $...
not-a-user's user avatar
  • 4,409
0 votes
0 answers
85 views

#!/bin/zsh for i in $(ls rid_*.xvg | sort -V | head -n1) do echo ${i} gnuplot <<- EOF reset session FILE="${i}" set yrange [0:30] # Gaussian function g(x)=...
Bussller's user avatar
  • 2,084
2 votes
3 answers
119 views

I am trying to generate a script that gets the number of keywords, asks you for each keyword, and assigns each one in a variable to a for loop, I have tried this so far: #!/usr/bin/env bash read -p ...
Owen Grumbles's user avatar
2 votes
1 answer
76 views

TL;DR I just want to run arbitrary shell commands with a static service user and see their output on the shell but also capture it for later use, i.e. send it by e-mail, and observe redirected output ...
Stefan Rickli's user avatar

15 30 50 per page
1
2 3 4 5
6198