Skip to main content
0 votes
1 answer
47 views

I have a program like this (the indented lines can be run multiple times): #!/bin/bash options="" options+=" --ignore={" read pattern options+='"' options+="$...
Julek's user avatar
  • 1
3 votes
3 answers
55 views

I have a Bash script that prints status headers using ANSI color escape codes. The script runs, the output prints, but instead of seeing colored text, I see the literal escape sequences printed to the ...
Flavio's user avatar
  • 664
3 votes
2 answers
103 views

When I add more than one variable in a while loop condition, the loop behaves unexpectedly. cat script.sh #!/bin/bash string=Db6laokfKc echo $string klen=`echo -n "${string}" | wc -m` #10 ...
achille's user avatar
  • 345
Best practices
0 votes
6 replies
89 views

I have a file example.txt with the following content: Begin of file BEGIN 1 2 3 4 5 6 7 8 9 10 END End of file I want to replace every second line inside a matched space of sed. So I tired cat ...
christian2222's user avatar
0 votes
0 answers
57 views

I’ve been trying to use the Terratest shell module to execute bash commands, but I haven’t had much success. Documentation appears to be limited, and most references I found were via AI tools. Below ...
PDGamer's user avatar
  • 11
-5 votes
0 answers
45 views

I want to disable Ctrl+S in VSCode. It's not that I want to pass CTRL+Q to bash. How to unfreeze the terminal in VScode after CTRL+S?
Takakiri's user avatar
Advice
0 votes
9 replies
89 views

The task is to show line with variables from one variable (substitute like echo "${!VAR_NAME}" but for multible variables at once) i e g l=$(head -1 "$table") #this header can vary ...
Ivan's user avatar
  • 61
Advice
0 votes
6 replies
74 views

I'm investigating how Bash parsing works. Let's assume that all lower-case letters here represent scripts that always return a successful exit status - 0. The contents of all scripts are identical. ...
elo2cx's user avatar
  • 33
3 votes
7 answers
225 views

I am using grep to look for strings (sequences) in a fastq-file and extract matching reads (lines). Since grep only finds perfect patterns, I was wondering whether it is possible in bash to generate a ...
Piratepenguin's user avatar
-4 votes
1 answer
108 views

I have hundreds of files on the following format 20100110_test_file.sas7bdat 20100210_test_file.sas7bdat 20100310_test_file.sas7bdat 20100410_test_file.sas7bdat I need to change the format all those ...
SASUSER's user avatar
  • 47
-1 votes
0 answers
29 views

I am implementing a full + incremental restore workflow using mydumper / myloader and MySQL binary logs. Backup step I take a snapshot-consistent backup using mydumper: mydumper \ -u Admin \ -h ...
Yash Khokhar's user avatar
3 votes
1 answer
171 views

I am writing a simple bash script for computing time and date by adding seconds onto a random date that I give. It worked fine so far but going from 2016-03-13 00:00:00 to 2016-03-13 03:00:00 skips ...
Redshoe's user avatar
  • 385
0 votes
0 answers
103 views

Given: #!/bin/bash set -x cat <<EOF | while IFS= read -r LINE; do "${LINE}"; done /usr/bin/bash pstree -u "${USER}" EOF It outputs: $ ./cat_while_bash.sh + cat + IFS= + read ...
Etienne M's user avatar
  • 733
3 votes
3 answers
166 views

Running Ubuntu 24.04lts. NOTE: I am trying to read the notification sent by he Discord app to my personal desktop notifications. When I notification from a specific sender, with a specific message, I ...
Joshua Besneatte's user avatar
0 votes
1 answer
76 views

I have a python script that runs as a service on raspi, the script executes a bash script which then connects to a windows pc via SSH using a key. I have successfully use the same code to connect to ...
zorodluffy's user avatar

15 30 50 per page
1
2 3 4 5
10457