Category "bash"

How to dynamically get the UID of the IOS simulator device and then install in that device

How to dynamically get the UID of the IOS simulator device and then install it in that device. I currently have this BASH script which does the job, however, wh

Behavior of sending email with text and attachment changed in Ubuntu 20.04 for mail from mailutils

In Ubuntu 16.04 I used the following command to send an email with text and attachements, which worked fine. echo "body" | mail -s "Subject" -A "/path/to/attach

Bash Scripts Are Not Executing From Production Build of Electron App

UPDATE: index.js file content added. I have this electron app that is executing some bash scrips(*.sh) files to perform some task. Everything is working absolut

(solved) bash script: how to cope with the different cp behaviors?

Among the tons of cp questions I have not found anything about this difference in behaviour (tested on Ubuntu 18.04). Sorry for the lost post, but the setting i

CyberArk ITATS004E Authentication failure for User in python script

I'm trying to implement a python script that executes local bash scripts or simple commands on remote CyberArk machines. Here is my code: if __name__ == '__main

Perl backticks using bash

In Perl, the default shell to execute backticks is sh. I'd like to switch to use bash for its richer syntax. So far I found that the suggested solution is `bash

Is there a way to get my laptop to beep from within a bash script running on a remote server via SSH?

I have a bash script that I have to regularly run on a remote server. Part of the script includes running a backup which takes a while, and after it has run, I

Log in to a site (Stack Overflow) by Bash

How can I log in to a website using Bash in Linux? For example, to log in to Stack Overflow I tried many different methods, shown below, but nothing's worked. w

Grep exclude count of occurence match between comments <!-- --> of curl body

I am very new to linux & bash script. I'm trying to read an xml file using curl command and count the number of occurrence of the word </entity> in it

Bash script for loop not exiting when command is successful

I have the following script #!/bin/bash echo '' maxTryTimes=10 for ((i=1; i <= maxTryTimes ; i++)); do echo "try setup mongodb replica ${i} ..." m

using python variables with bash magic in jupyter

I would like to run bash commands in jupyter notebook using the %%bash magic command and pass python variables. As described in this post I can do this as follo

How to make the ssh with -o StrictHostKeyChecking=no running on the docker in order to ssh the host work without exiting the script execution?

I have a script, that is running inside the docker container some actions we need for some internal debugging purposes: set -eu echo "Starting i/o test for hos

Exectuting Mininet CLI command in Xterm Window

I have a topology in which the h4 is the receiver and rest of the hosts are senders.I am executing a bash script on the h4 which returns the ip of one of the ho

Parse Text with "awk" and Modify One Of The Columns With "sed"

I have a data seperated with pipe "|" and I would like to parse it with awk and write it into a DB. EndpointRequest|ID-ip-172-31-70-119-eu-west-1-compute-intern

Trying to call a function within a function in Bash but it returns errors

I had looked on overflow and exchange, but I can't seem to find an answer for this. I am currently trying to make a recursive fibonacci function. However when I

grep for a pattern "variable=value" and returning only matching entries having a value > threshold

I am searching a kubernetes pod logs for the pattern “variable=value” ( e.g., variable=10 or variable=500) using the command below: Kubectl logs -f

How can kill all the processes triggered by hotkey with some smart way?

I want to kill a process and its son process with trap command: vim waiting.sh trap "kill $$" EXIT sleep 10000 Now run it in background: debian@debian:~$ b

Why does line comment tricks for bash not work with exclamation mark "!"

ref Inline comments for Bash? We can use this tricks echo abc `#put your comment here` \ def `#another chance for a comment` \ xyz etc but these d

how to autoinput in bash scripting

I'm tired to put username in this input by bash script i run the script but what shall i do when i rich to this line its expecting to input username Vpn.sh: 1:

how to autoinput in bash scripting

I'm tired to put username in this input by bash script i run the script but what shall i do when i rich to this line its expecting to input username Vpn.sh: 1: