Skip to main content

Questions tagged [bash]

Questions specific to GNU’s Bourne Again SHell, as opposed to other Bourne/POSIX shells. For questions about Unix shells in general, use the /shell tag instead. For shell scripts with errors/syntax errors, please check them with the shellcheck program (or in the web shellcheck server at https://shellcheck.net) before posting here.

Filter by
Sorted by
Tagged with
1 vote
3 answers
39 views

I'm in the following situation > ls H9/ HG01109_chr1_hap1_contigs.list HG01952_chr1_hap2_contigs.list HG02572/ HG03486_chr1_hap1_contigs.list ...
Matteo's user avatar
  • 335
0 votes
0 answers
11 views

The situation: I've been converting my family to Linux for quite some time now. I'm currently in the process of replacing their Roku with a Media PC (in this specific case, Pop_OS! 24.04 using Wayland ...
lilHar's user avatar
  • 125
5 votes
2 answers
557 views

$ sleep 1234& $ sleep 12345678& $ %sleep\ 1234 bash: fg: sleep 1234: ambiguous job spec $ jobs [1]- Running sleep 1234 & [2]+ Running sleep 12345678 & ...
Dan Jacobson's user avatar
0 votes
0 answers
38 views

Description I have two Raspberry Pi OS 13 (Trixie) systems with identical Bash versions and identical /bin/bash binaries (verified with md5sum). On one system, running bash -l sources ~/.bashrc as ...
Pixie 's user avatar
0 votes
0 answers
42 views

I have a little maintenance thing to do as super user, from time to time. I would like that to be a one-liner, for easy copying from my self-documentation to a terminal. I reduced it to the bare ...
db-inf's user avatar
  • 333
0 votes
0 answers
36 views

I created this function, which is supposed to allow an interactive selection of an mDNS hostname, and then connect to it via ssh. Yet, whatever I try, the host variable is only available in side the ...
Daniel D.'s user avatar
  • 175
0 votes
1 answer
65 views

I have just pasted a line into the bash shell. It contains embedded newlines. CTRL+a gets me to https at the start. CTRL+e gets me to 7d87 at the end. How can I move around from line 1 to 2 to 3 ...
Dan Jacobson's user avatar
3 votes
2 answers
338 views

I'm writing a script and I'd like to use set -o pipefail on shells that support it. Dash does not support that option. Usually, || true lets me swallow errors, but not in case of set: > podman run ...
Ark-kun's user avatar
  • 191
1 vote
1 answer
42 views

It often happens that I have some long task running, like compiling a program, running tests or copying large archives. Once I am done with whatever else I was doing, I want to leave the computer ...
Dominik Kaszewski's user avatar
5 votes
2 answers
869 views

I am using this code to parse the first argument passed to my script. It error handles and it works just the way I want it: if [ -z "$action" ]; then printf "[${c_RED}ERROR${c_RESET}...
EmberNeurosis's user avatar
0 votes
1 answer
71 views

I just rebooted one of my systems for the first time in several months, restarted tmux and my usual set of bash shells for tailing various log files, and noticed that running fg n (i.e. fg followed by ...
cas's user avatar
  • 85k
2 votes
3 answers
199 views

I have a script that parses command line arguments. The intro to the loop to iterate over the argument array looks like this: for arg in ${args[@]+"${args[@]}"}; do Can someone explain this ...
OneCheapDrunk's user avatar
3 votes
6 answers
423 views

I've tried using sed for this. I've tried putting the lines of interest in variables as well. I have two examples I want to achieve for now. Lets say I have thousands of urls in a file called links....
shrykullgod's user avatar
0 votes
0 answers
67 views

Hex memory dump is Docsis config file. Is it possible to convert this hex dump info valid Docsis config file? Preferably, using Perl and DOCSIS::ConfigFile module. (or Python scripts, python-docsis). ...
Lexx Luxx's user avatar
  • 1,471
3 votes
3 answers
912 views

The following script is supposed to check $1 and see if it is a specific value. It only works when one Bash [[... =~ ...]] regex check is passed in an if statement. The error is: When more than one ...
EmberNeurosis's user avatar

15 30 50 per page
1
2 3 4 5
1819