Questions tagged [shell]
A shell is software that lets users interact with the operating system, usually by typing at a command-line.
4,123 questions
2
votes
0
answers
55
views
Behavior for `less` inconsist on host system versus container managed by Docker
I am trying to perform a test sequence in a container managed through Docker, and have discovered a strange problem concerning the behavior of one particular common utility, less.
Based on the ...
-1
votes
2
answers
144
views
Why doesn’t “kitty confirm_os_window_close -1” work as expected? It still prompts for confirmation when closing on macOS
My kitty terminal asks for confirmation when closing terminal windows even though I set it to:
confirm_os_window_close -1
My expectation is that there's no confirmation prompt if there are no active ...
3
votes
1
answer
421
views
How to run shell commands via stdin?
I was working with a command like this:
ssh another_host <<EOF
set -x
command_a
command_b
run_framework
command_c
...
EOF
The odd thing was that only commands up to and including run_framework ...
2
votes
1
answer
192
views
How to get a list of existing files from a list of files?
I have a list of files (builddir/foo.s builddir/foo.i builddir/foo.ii) that happens to come from brace expansion of builddir/foo.{s,i{,i}} . I would like to symlink them into the current directory ...
2
votes
2
answers
114
views
How can I use Awk to match multiple lines and then concatenate other fields?
How can I use Awk to match multiple lines and then concatenate other fields?
1 Gen 1 75
1 Gen 1:1 10
1 Gen 1:1 11
2 Exo 1:1-2 13
2 Exo 1:1-2 14
3 Num 1:1-4 ...
0
votes
1
answer
158
views
Why doesn’t my sed command work properly? It replaces old values with errors
The sed command that I use is:
sed -i 's,oldvalue,newvalue,g' *.txt
When I use the above sed command with each of the below examples (1, 2, and 3), the results contain errors.
Example 1
Old value:
...
0
votes
0
answers
126
views
macOS VSCode Shell Command Error - "Unable to install the shell command '/usr/local/bin/code'."
I’ve recently installed VSCode on macOS Ventura 13.7.8 and I’m getting the error message "Unable to install the shell command '/usr/local/bin/code'." when I try to install ‘code’ command in ...
2
votes
1
answer
105
views
Why does `bind -x` with Ctrl+O stop working after dropping to shell from `vifm` in Kitty terminal?
bind -x '"\C-o":vifm'
This opens vifm but then when I drop down to the shell by pressing o on my keyboard triggering nnoremap o :shell<CR>, I am not able to use the ctrl + o keyboard ...
0
votes
0
answers
104
views
Can the fish shell also concatenate aliases that are input as arguments of doas and sudo?
Can fish run aliases input as arguments of sudo and/or doas?
What I have read thus far:
✅ Analogous feature for 'bash'. Dziȩki, @Kamil Macorowski
Aliases on fish
Related NixOS post
3
votes
1
answer
387
views
Systemd: How to unpack %I arguments to ExecStart without wrapping in Shell?
I have a systemd service like this, where the executable takes multiple arguments (with "-" flags and values).
pairman@revyos-lpi4a:~/.config/quasar/quasar-server$ cat ~/.config/systemd/user/...
2
votes
1
answer
398
views
How to directly reboot into the EFI GUI via an EFI shell? [duplicate]
Rationale
When working in an EFI shell, I frequently want to reboot directly into the firmware GUI, so that I can modify a preference. Rebooting the machine the regular way, then either mashing a key, ...
-3
votes
1
answer
99
views
bc command results are not what are expected when changing from ibase to obase
I am trying to convert non-base 10 (non-decimal) numbers to each other by using bc command in Linux, but the answers are different from what I expected.
ibase = 3
obase = 7
23
11
Why is the answer 11?...
2
votes
2
answers
340
views
How to reuse the content of file descriptor more than once?
Working with big ASCII files that I keep compressed on disk. (ie, bigfile.json.gz)
Clever me thought "Hey, let's use process substitution to work with the uncompressed content of the file."
...
2
votes
0
answers
69
views
After killing python3 in subshell with `Ctrl+\`, bash stops echoing prompts
I save this shell script as test.sh and then run bash test.sh:
python3
When the prompt appears I press Ctrl+\ (in reality I have more complicated Python commands and Ctrl+C/Ctrl+D doesn't work). ...
13
votes
1
answer
2k
views
Is there any scenario where using cat speeds things up?
In Useless use of cat? it is established that, generally speaking, using cat in a shell pipeline with a single argument at the beginning of a pipeline reduces its performance.
Does there exist a ...