Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
7 replies
91 views

Does Bash support local variables in POSIX mode? x=42 echo $x foo() { local x=43 echo $x } foo echo $x $ /bin/bash4 script 42 43 42 $ /bin/bash4 --posix script ?
Alexander Lubyagin's user avatar
0 votes
0 answers
89 views

Given the following script: curl --interface wlan0 --connect-timeout 60 --max-time 1800 -X PUT -T /tmp/compress_log/20250922_utc.tar.gz "https://ota.eu.globe-groups.com/devicelogs/881e3272-4ab4-...
chunqiu ding's user avatar
2 votes
4 answers
162 views

I'm learning bash from a book and just wanted to see if there is a more efficient way to do this. The output of cat /proc/acpi/wakeup is multiple lines, but I only care about this one: GPP0 S4 ...
dbaser's user avatar
  • 327
0 votes
0 answers
49 views

I want to create a shell script to do a gradle build and then deploy to my local .m2. However, my attempt fails. My directory structure is as follows: my-app # root of project + build +...
BreenDeen's user avatar
  • 744
5 votes
1 answer
132 views

Context : I am making my own cloud save manager for my non steam games, I am in the process of implementing a wrapper that launches games but also loads file from the cloud before opening and when you ...
Tima_ben's user avatar
0 votes
0 answers
40 views

I use a (commercial) software that uses a sh script to start, run_sw. If I run this script from the terminal it works fine. But if I run the script from another script that I have created, my_script ...
Andreas's user avatar
  • 27
0 votes
0 answers
50 views

I would like to get pod name in groovy, and then to use this name to launch script in this namely pod For example i get pod's name : def testVar = "Test" ...
Bilow Yuriy's user avatar
  • 1,329
2 votes
1 answer
98 views

While experimenting with inline environment variables, I noticed that although they are correctly applied to command execution, their expansion sometimes retains the previous value—but not always! ...
Léa Gris's user avatar
  • 20.2k
0 votes
0 answers
68 views

Here's a sample of my script below. Lines 1 to 11 are the information about the script. Lines 12 to 16 are the setup for some of the instructions on my script. Lines 17 to 23 are kind of like a check ...
Patron0119's user avatar
0 votes
2 answers
116 views

I'm working on Quectel EC25 sim-modem converter which has an ARMv7 32-bit CPU. I want to get telemetry data via POSIX commands. This is the equivalent code in C: int tempeture(){ FILE *file = ...
SerifDogru's user avatar
0 votes
1 answer
86 views

I have a shell script to set the CPU frequency to maximum on all cores on Android devices. The contents are: #!/system/bin/sh cpucores=`grep -c ^processor/proc/cpuinfo` cpusint=`echo $((cpucores-1))` ...
IsHacker's user avatar
  • 112
1 vote
1 answer
114 views

I have the following shell script: #!/usr/bin/env sh PIPE_PATH="/tmp/mypipe" test -p "${PIPE_PATH}" || mkfifo "${PIPE_PATH}" processCommandsFromPipe() { local pipe=&...
carlfriedrich's user avatar
1 vote
1 answer
190 views

I am struggeling to make a working signature of a certificate which will be used later in a JWT in an RPG-program. We use this version of openssl: "OpenSSL 3.0.10 1 Aug 2023 (Library: OpenSSL 3.0....
baphomet's user avatar
  • 129
1 vote
0 answers
30 views

This command: (echo 01 && sleep 1 && echo 02) | grep -E '[1]$' | tee /tmp/output.txt Outputs 01 to both terminal and /tmp/output.txt This command: while true; do date +%S; sleep 1; ...
Andreas Tzionis's user avatar
0 votes
0 answers
27 views

I have problems with replacing parenthesis in combination with variables, in ssh. For instance, replacing (hello123blablabla) with (hello). So, it replaces all together, and parenthesis as well, at ...
armagedescu's user avatar
  • 2,417
0 votes
3 answers
307 views

I'm using git bash on Windows 11, and I customized the prompt by modifying the git-prompt.sh file to suit my taste and to display the name of the virtual environment. I changed the prompt to display ...
MadSweeney's user avatar
1 vote
1 answer
56 views

I have complex multi-step 'init' operations which can be ignored when they work. Having the echoed commands and their output at the beginning of every operation swamps the output you care about. I ...
cefn's user avatar
  • 3,446
0 votes
0 answers
124 views

I m on latest Jenkins 2.479.2 with jdk 17. I was able to start slave node with label Prod_Slave_56 and see no errors. Agent successfully connected and online I created new pipeline job runs but hangs ...
Ashar's user avatar
  • 3,195
3 votes
2 answers
102 views

I have a small regexp that should verify if a commits subject adheres to the ReactJS commit message format. Since the expression works with my test strings the code left me baffled. This small example ...
Jazzschmidt's user avatar
  • 1,125
0 votes
0 answers
41 views

A little new to cronjobs on kubernetes and getting familiar with it. So I'm trying to migrate my onprem cronjobs to k8 cronjobs. I have created them in the required yaml file with the right mounts. ...
Jr.Macking's user avatar
-1 votes
1 answer
156 views

I'm trying to replicate the functionality of /etc/profile.d by copying the segment of /etc/profile that runs the scripts in profile.d in my ~/.profile, and have it run scripts under ~/.profile.d. Here'...
chexo3's user avatar
  • 59
5 votes
5 answers
257 views

I am trying to write a simple script that will receive a text via standard input and will output everything as it is except it will replace occurences following this pattern: {{env MYVAR}} {{env PATH}...
M.E.'s user avatar
  • 5,695
0 votes
0 answers
51 views

I would like to set a variable (say A) from the value of another variable that is only known at build time, for instance HOME: FROM ubuntu RUN export A=$HOME/file.txt Then: docker build -t mubuntu -&...
Abdelghani's user avatar
1 vote
3 answers
87 views

I am trying to write a shell script to check and delete files/folders #!/bin/bash deletepath="path" donotdelete="$2" timestamp=$(date +%Y%m%d_%H%M%S) filename=log_$timestamp.txt ...
Hacker's user avatar
  • 7,926
-2 votes
1 answer
81 views

I have an API or Endpoint below endpoint use GET method: https://test.cloudnetwork/devops/api/status?over=658xx899xxx68sspo its response below one { "info": testing of cloudnetwork data ...
cloudnetwork's user avatar

1
2 3 4 5
173