Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

Question list filters

Filter by
Sorted by
Tagged with
Filter by Employee ID
Score of 6
5 answers
224 views

I have a file where a pattern repeats a various number of times between lines that are relevant. I want to keep only the last of the lines that repeat in each occurrence of the repetition. This is ...
Score of 4
2 answers
103 views

This is using bash 5.2 on Ubuntu 24.04. I have the following two scripts. init.sh: #!/bin/bash function init_env() { # Setup some critical variables declare -agrx BIRD_LIST=("albatross&...
Score of -3
1 answer
120 views

What does echo "\" do? Why is it multiline? Does it somehow escape the newline character? When newline appears as part of the variable, it processes it. Why do Ctrl-C and Ctrl-D exit the ...
Score of -3
1 answer
63 views

When any model in OpenCode Desktop app tries to run any command in shell or terminal or bash, then it shows "EPRM" error. It cant run any commands or terminal. Can anyone tell me what to do? ...
Score of 0
3 answers
150 views

I have a bash script with n > 1 commands that looks as: #!/bin/bash cmd_1 cmd_2 ... cmd_n Is there a way to run this script from the latest command to the first one without writing another ...
Score of 4
3 answers
137 views

Let's say I have a bash array that looks like this: samples=("one 1 uno" "two 2 dos" "three 3 tres") I'm looping through this array, hoping that I will get three ...
Score of 2
1 answer
83 views

I have been porting a pipeline over to NextFlow that involves saving inter-process temporary files to a secondary directory for later access. I set publishDir to this temporary directory, and when I ...
Score of 0
0 answers
50 views

In bash, a read -p "This is the prompt > " will show the prompt to the user only if the user is at a terminal. I often use emacs shell buffers as terminals, but the prompts aren't shown. ...
Score of -3
0 answers
98 views

I want to tidy up my (onsite) backup and remove duplicated files. The deletedfiles folders are created by rsync. Some have been zipped. Searching for $file=IMG_8041.JPG found=$(unzip -l $i | grep &...
Best practices
0 votes
5 replies
101 views

I'm trying to write a few inline tables that will be stored in bash variables but I can't get stdin/stdout to redirect the right way when using read -d '' VAR to try storing them into variables. I ...
Score of 2
2 answers
144 views

When I run the following bash script: options="--nup 2x2 --column true --columnstrict true" pdfjam inp.pdf '1-8' $options --offset '0mm 1mm' --outfile out.pdf everything runs fine, and I ...
Score of 3
1 answer
113 views

I can run code like this in bash #: can works well: #: (start a new bash) foo_a () { echo a ; } foo-a () { foo_a ; } echo will out a: foo_a It works well. These work well also: #: can works well: #: (...
Score of 0
1 answer
88 views

I have no idea why the code below doesn't work. The if clause is never true, even if variable $cf1 is a true "yellow" or a true "white". The true value becomes yellow if the ...
Advice
0 votes
5 replies
149 views

In my .tar.gz a number of txt-files are archived. I would like to count the number of lines for each one and report a list having the number besides the filename, f.e. a.txt 88 b.txt 233 c.txt 101 I'...
Score of 3
2 answers
120 views

bash 5.1.8 mongosh 2.5.10 mongodb 8.2.9 This works: $ mongosh HIFRRMGP --eval 'db.AuditLogCollection.countDocuments({})' 137 And this works: $ mongosh HIFRRMGP --quiet HIFRRMGP> db....

15 30 50 per page
1
2 3 4 5
10445