Skip to main content
Best practices
0 votes
1 replies
28 views

I want to write a small tool or Bash function that can be used like: tool foo bar file and it should replace all occurrences of foo in file with bar. The key problem for me: both foo and bar can be ...
Qiu Yangfan's user avatar
Advice
0 votes
0 replies
15 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
3 votes
3 answers
52 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
  • 435
0 votes
1 answer
61 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
126 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
0 answers
54 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
0 votes
0 answers
42 views

I have a bash script that I use to gather the usage stats of my storage volumes and email myself the results. Done so I can keep an eye on unexpected changes in disk usage. The relevant code that ...
NAS Box's user avatar
1 vote
2 answers
50 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
2 replies
33 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
56 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
  • 1,979
0 votes
0 answers
58 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
92 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
Best practices
0 votes
0 replies
38 views

I was trying to exercise with Bazel by packaging a deb package from a collection of scripts I'm writing to automate a few tasks at work. Right now, I keep them either in /usr/local/bin or \~/.local/...
Alessandro Bertulli's user avatar
Best practices
0 votes
1 replies
32 views

We've had troubes in the past trying to validate github environment against unset/empty secrets or variables. I've used bash scripts like [ -z "${{ secrets.mysecret }}" ] && exit 1; ...
some_random_dude's user avatar
1 vote
0 answers
74 views

I have a high memory program (ML) that I want to run in a tmux session. However, if the process is OOM killed, the tmux session is also shut down. I partially solved it (using the below run-bg), but ...
Awes's user avatar
  • 41

15 30 50 per page
1
2 3 4 5
10459