Skip to main content
3 votes
2 answers
105 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
91 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
3 votes
3 answers
57 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
0 votes
1 answer
49 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
0 votes
0 answers
58 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
46 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