Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
0 answers
17 views

I'm trying to install angsd for running paired-end screening data analysis and after git clone and going into the folder, when running the command make, I keep getting the following error: kprobaln.c:(...
Lis's user avatar
  • 1
-1 votes
0 answers
58 views

I've created a custom .NET Template for Clean Architecture and I want to automatically initialize a Git repository and run setup scripts after the template is created. Current Setup This is my ...
Mahmoud Sayed's user avatar
3 votes
1 answer
84 views

I came across this line in my homework: (cat "$@" 2>&1 >&3 | tr a-z A-Z >&2) 3>&1 Is the 3>&1 executed first to create a file descriptor 3 pointing to ...
pelican's user avatar
  • 55
1 vote
3 answers
128 views

This calculation time { < <(seq 0 20000) readarray -t array ; } takes 0.309 seconds on my computer. But this: time { < <(seq 0 20000|sort) readarray -t array; } takes only 0.074 seconds. ...
programmer's user avatar
-4 votes
0 answers
31 views

Introduction I want to reference the env values defined inside docker container. I want them to be able to them in bash CLI and in bash scripts. Problem However, referencing them like $MY_ENV, ${...
Rashiq's user avatar
  • 443
-2 votes
0 answers
92 views

I use a bash script to copy citations from Zotero to Obsidian. I trigger the script via a hotkey, however, the sed command also works if you have it in a terminal, then copy the citation to the ...
ReaderGuy42's user avatar
1 vote
2 answers
66 views

I'm using Bash 3.2 in macOS Tahoe. I've hacked together this function to show an informational dialog: showDialog(){ local strDialogText=$1 local intDialogSeconds=$2 IFS='' read -r -d '' strJS <&...
Robert Kreegier's user avatar
Advice
0 votes
2 replies
39 views

Please who can explain and guide me on this assignment thank you. We walked through examples of all 10 labs during demos. Complete them on your local machine to solidify everything: Hello World ...
Cristian 's user avatar
-2 votes
0 answers
37 views

I’m using Parrot OS with the MATE desktop on X11. What I want: - Press 1/2/3/4 - If the focused app actually uses the key (typing in terminal, browser input, editor, shortcuts, etc) → let it behave ...
Nishchal Acharya's user avatar
-1 votes
1 answer
76 views

A little background. I work across multiple systems and so I would like a way to make life a little easier keeping all the basics in sync. My idea was to create a folder called ~/common_files/, put ...
David Shaw's user avatar
3 votes
5 answers
188 views

I want to produce this output: 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 For that I created this script: (Based on https://stackoverflow.com/a/23961301/22133250) ...
Signor Pizza's user avatar
1 vote
1 answer
126 views

These two examples accomplish the same thing: # using eval var=hello eval "some_func() { echo $var; }" some_func # "hello" # using source var=hello source <(echo "...
Caleb Foster's user avatar
Best practices
1 vote
2 replies
34 views

I'm trying to understand how variable expansion works across multiple shell levels, particularly when using sudo -i versus nested bash -c commands. Background: Nested bash -c behaviour First, let me ...
kvantour's user avatar
  • 26.9k
0 votes
1 answer
58 views

Using VS Code on Linux Mint, I'm trying to npm run a bash script from within VS code, but I get an error; ls: cannot access '/usr/bin/convert': No such file or directory The terminal process "/...
CAB's user avatar
  • 1,150
0 votes
0 answers
39 views

I’m developing CKAN extensions using the official ckan-docker setup with the dev images and need to restart CKAN after various updates in my extension. Inside my main ckan container (run via ...
WeSee's user avatar
  • 3,854
7 votes
6 answers
536 views

Here is the output of my curl command (print headers only): HTTP/1.1 200 OK Server: CacheHTTPd v1.0 Date: Thu, 08 Jan 2026 19:21:11 +0000 Content-Type: application/octet-stream Content-Length: ...
Ramesh's user avatar
  • 71
3 votes
1 answer
117 views

I have a json file, vars.json, of arbitrary length, in a format like [ { "environment1": { "variable1": "Value1", "variable2": "Value2&...
Bipolarbear54's user avatar
0 votes
1 answer
49 views

After a lot of tests and researches I can't find how to solve this. I am working on a midi controller adaptation for vlc on linux and I have a simple but annoying problem: on my event listening with ...
Amaruq's user avatar
  • 1
-3 votes
1 answer
83 views

First off, allow me to apologize for the confusion this question has created, and for my tardiness in responding. I live completely off-grid, and can only access internet at the library when I come to ...
user985675's user avatar
0 votes
0 answers
30 views

Given this script kill.sh: #!/usr/bin/env bash for i in 0; do sleep 1111 done & pid=$! trap 'echo killing $pid && kill $pid; exit' INT sleep 2222 $ ./kill.sh ^Ckilling 25190 But the ...
Rihad's user avatar
  • 139
4 votes
2 answers
112 views

I am downloading a file weekly from an sftp server. The filenames are random so the only way to identify the new file is to use the system metadata to find the last modifed time of the files. I can ...
Jagge's user avatar
  • 1,038
2 votes
3 answers
156 views

We are creating docker images from MySQLdump from all kind of systems and try to extract the DB version via Regex from files like this: -- Server version 10.11.8-MariaDB-0ubuntu0.24.04.1 $ echo &...
Alex's user avatar
  • 35.8k
Tooling
0 votes
14 replies
225 views

I have two computers. One with Arch Linux installation with any modern software. Another with 32bit Windows 7. My goal is to transfer around 100GB of files from Linux to Windows. I have USB 3.0 to ...
hlebyshek's user avatar
0 votes
1 answer
87 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
116 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
  • 672
3 votes
3 answers
150 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
  • 337
Best practices
1 vote
8 replies
145 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
Advice
0 votes
9 replies
95 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
79 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
287 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
109 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
3 votes
1 answer
177 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
105 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
  • 765
3 votes
3 answers
212 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
113 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
2 votes
1 answer
64 views

I am trying to implement a CIS hardening rule on Ubuntu that requires every GRUB linux entry to include: apparmor=1 security=apparmor Audit script #!/bin/bash if grep "^\s*linux" /boot/grub/...
ÇAĞRI KARAKUŞ's user avatar
Best practices
3 votes
2 replies
116 views

I want do download certain search results from the internet archive. I would like that the names of the resulted files and directories to be the title of the work -- idealy YYYY_<author>_<...
alex's user avatar
  • 1,145
-1 votes
1 answer
135 views

I am trying to run a bash command through Java.Runtime.exec(), specifically coredumpctl. I am only able to run the command on a bash terminal when I login as a root user, and this doesn't seem to be ...
user23282541's user avatar
2 votes
1 answer
192 views

for in in Bash is setting variable. I need only the variable itself from this command. for VAR in FILE*; do something (hate it) done I plan to use this variable later, not in the block itself. Just ...
Verity Freedom's user avatar
Best practices
2 votes
10 replies
212 views

I want to write a small tool or Bash snippet that can be used like: tool key value file and it should replace all occurrences of key in file with value. I tried: sed -i "s/${key}/${value}/g"...
Qiu Yangfan's user avatar
Advice
0 votes
1 replies
54 views

This script adds a line to add custom.js to vivaldi browser directory: #!/bin/bash vivaldi=/opt/vivaldi/resources/vivaldi moddir=$HOME/vivaldi-modding/ sudo cp $moddir/custom.js $vivaldi sudo sed -i -...
Rainer Brumshagen's user avatar
6 votes
4 answers
220 views

I was working on a one-liner to subtract a constant value (e.g. 100 in this case) from a specific column using awk. So far I can manage to get to where I can print the last iteration only – which ...
Matteo's user avatar
  • 629
0 votes
1 answer
98 views

I created a script that is run by cron to open a tab in firefox. It will open a tab in firefox, but the tab is a new window. If I have firefox open, I need it to open in the same window that is ...
user3273814's user avatar
5 votes
2 answers
169 views

Here is a bash script: #!/bin/bash char=$'\x01' if [[ "$char" =~ ^[\x01-\x20\x7F-\xFF]$ ]] then echo "Unprintable" else echo "Printable" fi The script ought to say ...
Melab's user avatar
  • 2,986
1 vote
1 answer
91 views

I downloaded Fedora 43 Cosmic (Wayland) and found no way to disable my touchpad (mouse is always connected). xinput and synclient seem to be X11 only. Touchpad Disable is a simple checkbox with KDE ...
One Dash Dot compact web's user avatar
1 vote
2 answers
62 views

I have the following script, which should read the output from another command and then wait for changes, syncing these to a target directory. I replaced the actual commands with sleep and cat to make ...
Mischael Schill's user avatar
Advice
0 votes
3 replies
48 views

My question is not about how to use nohup to redirect output. I've been using it for a while. Let me first state that I use bash. I know that by default, nohup my_command redirects stdout and stderr ...
potim's user avatar
  • 11
0 votes
2 answers
70 views

Suppose my current activated conda environment is py314 on Linux. When I start a new bash environment from the current one, no matter via command bash, screen, or start vscode from command line, the ...
link89's user avatar
  • 2,017
0 votes
0 answers
78 views

I'm trying to translate my bash scripts using the gettext tools but I have a problem where the encoding seems to be wrong. Let's say I have the following file called fr.po: # French translations for ...
Elie G.'s user avatar
  • 1,784
0 votes
1 answer
150 views

I am attempting to compile and run a Fortran 90 program using command line (bash). In the past, when I've run gfortran /path/to/file, a file a.out and a file program_name are created, and I can run ...
JDoe's user avatar
  • 11

1
2 3 4 5
3137