Skip to main content

Questions tagged [scripting]

A script is a sequence of commands or instructions that are executed by an interpreter program rather than compiled into a standalone executable program.

Filter by
Sorted by
Tagged with
0 votes
4 answers
71 views

I would like to mount a partition of an external hard drive from a script using udisksctl mount --block-device /dev/sda1 and in the end of the script I would like to unmount it. However, it may ...
Alexey's user avatar
  • 2,380
5 votes
1 answer
332 views

This may seem like a question asked, but I have yet to find anything that works and I start suspecting it may be a bug in apt-get… So, I have a python installer wrapping around apt-get, whose relevant ...
Hi-Angel's user avatar
  • 5,600
1 vote
1 answer
40 views

I'm trying to compile the drm-subtree of JSM because I want to enable the panfrost driver on the RockPro64 / KHADAS EDGE-V / RK3399. The code is here: https://github.com/jsm222/drm-subtree He improved ...
john_connor's user avatar
2 votes
4 answers
147 views

#!/usr/bin/env bash exec {BASH_XTRACEFD}>./xtrace.log declare -p BASH_XTRACEFD set -x { : "how do you hide this in ./xtrace.log?"; } 2>/dev/null # fail # { :; } "${BASH_XTRACEFD:-...
anick's user avatar
  • 601
1 vote
1 answer
42 views

made a simple command to change my power mode to "balanced-performance" (lenovolegion power mode for custom mode), works fine in terminal and running the file, but when listing it as a ...
bomby's user avatar
  • 11
3 votes
7 answers
1k views

In Linux in a folder, without subfolders, there are many files like this scheme. I list them with ls -1. 1yBWVnZCx8CoPrGIG.part01.rar 1yBWVnZCx8CoPrGIG.part02.rar 1yBWVnZCx8CoPrGIG.part03.rar ...
Banana's user avatar
  • 241
0 votes
7 answers
2k views

Bash allows to export read-only variables and functions to the environment. Also, when a bash script is run, Bash sources the file BASH_ENV was set to, unless invoked with -p. How do you protect ...
anick's user avatar
  • 601
10 votes
7 answers
1k views

I am writing a script that locates a special type of file on my system and I want to check if those files are also present on a remote machine. So to test a single file I use: ssh -T user@host [[ -f /...
Nunkuat's user avatar
  • 203
2 votes
1 answer
79 views

The goal is to get modbus ascii working with a Wallbox from ABL. So I placed a RS485 to TCP converter in the box, created a pseudo tty for my application and got the wrong frame. The answer starts ...
martin's user avatar
  • 21
1 vote
1 answer
102 views

In Linux there are some Folders. I want to process each of this Folders with the program myprogramm. I get a list with ls -1 or much better, sure only Folders with: find . -maxdepth 1 -type d -printf '...
Banana's user avatar
  • 241
0 votes
3 answers
608 views

I have a third-party service. Its API and credentials let me scrape service data on my local Linux machine. I want to use this API inside a bash script and launch it via cron, but I don't want to ...
Aleksey's user avatar
  • 75
0 votes
1 answer
129 views

I tried this grep -rn "application_config_project" . I got many application_config_project_name = f"{app_acronym}-application-config" github_application_config_repo = ...
MJoao's user avatar
  • 47
0 votes
0 answers
52 views

Does anyone know of an open source application or perhaps how to integrate an existing find dupes script with some OS tool (emacs, vim, Finder.app, mc, etc...) to open a file before marking that file ...
atod's user avatar
  • 155
0 votes
5 answers
214 views

In Linux in a directory there are files, ls -1 shows me this output : file1.1-rvr file1.2-rvr file1.3 file1.4-rvr file1.5 file1.6-rvr file2.1 file2.2 file3.1 file3.10 file3.2-rvr file3.3-rvr file3.4 ...
Banana's user avatar
  • 241
0 votes
2 answers
97 views

I am using Ubuntu Linux and Mageia Linux... I wish to do the following: in a text file (sample.txt), find and delete every line comprising the symbol '#' (or '?') or a specific word (e.g. 'mobile') ...
Vinz M's user avatar
  • 11
1 vote
2 answers
93 views

Paths to ELF shared objects in LD_PRELOAD cannot contain spaces, as space is one of the two list separators, and it cannot be escaped: LD_PRELOAD A list of additional, user-specified, ELF shared ...
finefoot's user avatar
  • 3,586
0 votes
1 answer
96 views

My program involving Numerical Mathematics takes a long time to run (12-15 hours). I usually leave it running overnight and check the results the next morning. However, I want to prevent the over-...
Shuxue Jiaoshou's user avatar
-1 votes
3 answers
210 views

if [ -d directory ]; then echo "directory exists"; else echo "does not exist"; fi tests for the existence of directory by virtue of the -d test. Does the -d test return the ...
Adalbert Hanßen's user avatar
0 votes
0 answers
70 views

I'm trying to pass a command through to ffmpeg, but I'm struggling to get it to work with spaces in the name. I've tried this: filters="-vf subtitles='$filename.$format':force_style=Fontsize=24&...
Cestarian's user avatar
  • 2,593
4 votes
2 answers
682 views

I'm trying to find the "right" way to read files line-by-line. I have been using for for line in $(cat "$FILE"); do for a while, and I really enjoy its clearness. I know that while ...
atis's user avatar
  • 43
0 votes
1 answer
409 views

I'd like my log files to be named after a variable. Since this isn't possible: #SBATCH --output some_software.${var}.out #SBATCH --error some_software.${var}.err I came across this work around but ...
Caterina's user avatar
  • 103
0 votes
0 answers
98 views

Opening vim while recording with script causes script to go wild (my screen starts filling up with a bunch of crap, some of which says "script", and I also believe it is colored neon green). ...
leeand00's user avatar
  • 4,971
-3 votes
1 answer
151 views

In Linux with Bash, there is the File numbers_in_one_line. In this file there is only one line with several numbers, all separated by spaces. These numbers are the value in bytes for creating files ...
user447274's user avatar
0 votes
1 answer
101 views

In Linux in Bash, there is a script, a part of the script is this while true ; do echo awk -v x=$(<"$TEMPDIR"size_container_in_byte) -v n=$(<"$TEMPDIR"parts) 'BEGIN{...
user447274's user avatar
3 votes
3 answers
464 views

bit of a strange issue for you. I have an old 2-in-1 laptop tablet thing that works well enough, except the driver for the touchscreen occasionally crashes, leaving it unusable. I have a simple script ...
Gridzbi Spudvetch's user avatar
-7 votes
2 answers
166 views

In Linux, using Bash, I have two scripts: script.sh is the main script, and script_config.sh is the configuration for script.sh. In script.sh, I do source script_config.sh to load all the config ...
user447274's user avatar
1 vote
1 answer
102 views

I am running various scripts on Debian 12.X currently with the following bash: GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu) I have the following methods/options to execute the script. ...
ReflectYourCharacter's user avatar
0 votes
2 answers
178 views

I'm trying to write a bash script (very new to writing them btw) on a Linux system, and I basically want it to execute a command every say 5 seconds while another command isn't outputting a value. So ...
Tamrak's user avatar
  • 3
-3 votes
1 answer
66 views

There are many files in this format: IMG_20240717_191421.jpg IMG_20240620_165358_BURST001_COVER.jpg IMG_20240624_173513_2.jpg how can they renamed in Linux in Bash to: 20240717_191421.jpg ...
user447274's user avatar
0 votes
5 answers
174 views

There is a folder with many files in it: 112.mkv 123.md5 123.mkv 221.mkv 467.mkv aa1.mkv abc.md5 abc.mkv bbc.mkv dde.md5 dde.mkv ggh.mkv .... xxy.md5 xxy.mkv xxz.mkv How can I move .md5 files and the ...
user447274's user avatar
1 vote
2 answers
264 views

How automatically open a URL after rebooting on a Debian desktop? 1- Running the command by terminal: xdg-open http://homeassistant.local:8123 OK it works and opens the URL above 2- creating any ...
carlos rother's user avatar
6 votes
4 answers
622 views

While administrating a linux server (a Debian server, for instance), I often switch users. Sometimes, I will chain multiple user switches together: aluriak$ sudo -s root$ […] root$ su aluriak aluriak$ ...
aluriak's user avatar
  • 193
0 votes
0 answers
48 views

Situation: I have a HTPC running Nobara linux (flavor of Fedora) and I have an Xbox controller that is connected to it and will wake it from sleep. Problem: HDMI-CEC is not supported by my hardware. ...
Fader's user avatar
  • 1
-1 votes
1 answer
167 views

I need to install something that allow me through a script bash or if I can do it without install any external tool it would be great. The thing is I read about csvkit but is a tool of python and i ...
user714955's user avatar
-1 votes
2 answers
106 views

whats wrong with this bash script: acme2=$(dig txt @$1 _acme-challenge.$1.de) acme3=$(echo $acme2 | grep "^_acme") ...
dg1kpc's user avatar
  • 1
1 vote
1 answer
218 views

I have a script and patch that I took somewhere to compile an image (linux build root) and I added some lines and now I got one error during patch, the error is like that: diff --git a/package/base-...
James78's user avatar
  • 189
0 votes
1 answer
139 views

I need to run script on remote server which require root access using sshpass and its failing with eror script not found. I ran below command. sshpass -frhelpass ssh user@IP 'echo mypass | sudo -S &...
user29368204's user avatar
3 votes
2 answers
158 views

I use an interactive wallet spectre-cli of Spectre, a coin similar to Kaspa in its design. When I manually want to get the balance of my wallet I need to run spectre-cli and then connect, open from ...
John Smith's user avatar
5 votes
4 answers
623 views

I would like to execute a script on a host machine (script_on_host.sh), which then reaches inside a docker container in order to grab some data using a second script (script_in_container.sh). The data ...
teeeeee's user avatar
  • 305
3 votes
2 answers
124 views

My shell is the Korn Shell, but I think the problem (and its eventual remedy) applies to other shells as well. I usually build a "simulation mode" into my scripts to test potentially ...
bakunin's user avatar
  • 793
1 vote
1 answer
187 views

with the following command line, which I turned into an alias, I would like to open the pdf files from my terminal. alias pdfLoad="fd . '$HOME/OneDrive/DBCalibre' -t f -e pdf | fzf | xargs -0 -I ...
Salvatore Di Fazio's user avatar
1 vote
1 answer
86 views

I have a BASH script problem that I've narrowed down but I can't understand what I'm seeing. I want to get a substring of an array in a succinct way. Here's what I'm seeing in bash, with 'set -x' so ...
John Hawthorne's user avatar
1 vote
1 answer
73 views

there are 4 scripts that should be started after reboot as user "appian": /opt/appian/appian_home/services/bin/start.sh -p Password -s all /opt/appian/appian_home/data-server/bin/start.sh /...
Arjun S's user avatar
  • 11
2 votes
1 answer
182 views

In Linux in Bash in a Script i use this: #!/bin/bash while true; do while true; do read -r -p 'enter number [4-999]: ' num if [[ $num =~ ^([4-9]|[1-9][0-9]{1,2})$ ]]; then ...
user447274's user avatar
0 votes
3 answers
241 views

I am attempting to generate a file that I can append to visudo. The task itself is not too important as I'm just trying to dig a little deeper Bash. My current script looks like this: #!/bin/bash ...
Ambre's user avatar
  • 111
0 votes
1 answer
61 views

On their website, you're asked to install their program via a script instead of downloading it via a package repository like most regular apps do. LV_BRANCH='release-1.4/neovim-0.9' bash <(curl -s ...
Folaht's user avatar
  • 1,166
-4 votes
2 answers
138 views

How to write in Linux in Bash in shellscript a part that can do something like this enter a number must be in a range from 4-999 if not, ask again to enter enterednumber * 5 * randomnumber [1-9] (...
user447274's user avatar
0 votes
1 answer
353 views

I've been trying to get a very simple startup script but no matter what I try I can't get it to actually run on boot. For simplicity sake I while testing I just wanted to open my Browser, which works ...
DrDecane's user avatar
0 votes
1 answer
230 views

i want make it automatically to start with no-cursor: startx -- -nocursor this is worked but this is command..i want to autostart to user: kiosk.. (but i don't want to use "unclutter") i'm ...
Manuel songokuh's user avatar
0 votes
1 answer
44 views

I want to record a gif with interaction of my Linux tool (REPL), but it's time consuming to make it perfect without any mistakes when I type the commands. So I was wondering of using script command ...
jcubic's user avatar
  • 10.5k

1
2 3 4 5
92