Category "bash"

execute a shell script from different folder in Python

I'm not a pythonist, just need to fix some script. So I'm want to run some Bash shell script that placed not in the same folder as the Python script but in one

Linux Bash to mysql: Select or delete record with external value

I have a MariaDB (mysql) database with a table which looks like this: MariaDB [DevicesPool]> show columns from Dirs_and_Names; +-----------------+-------

Is there any way to load FBX file using ARKit?

In my project I am projecting 3d files using ARKit. I am able to project .dae and .obj format models. Is there anyway I could load .fbx files?

Remove Files whit name '\' [duplicate]

I make mistake file with this name '' and i do not know how to clear this file How to remove the file with this name '' ? rw-r--r-- 1 root ro

Git bash giving error of warning: unable to rmdir

I am using git bash on windows 10 which was recently updated to creators update. whenever i am trying to switch between branches i get following thing $ git f

How to prompt the commands that are written in a text file previously for spike?

I am using Spike to run a RISCV CPU. I will write the same set of commands many times that I wrote below run 100 reg 0 run 100 reg 0 run 100 reg 0 I actually

Raspberry Pi - fbi process blocking Teamviewer

I might have a rare case, but at the moment I'm not able to find a solution for this problem. I've installed a RaspberryPi 3 in a local business to display imag

How to find file path to a bash file when the folder is renamed or moved to a new drive?

I've made an executable jar file for a terminal game that can be opened by typing java -jar name.jar in the Terminal. Then I made a .sh file inside the same fol

How to append json array using jq+shell in a loop?

I can create a json object with an array using jq like this echo '{"input":{"names":[]}}' | jq --arg val "alice" '.input.names[0] += $val'| jq --arg val "bob"

Extract string between combination of words and characters [duplicate]

I would like to keep the strings between (FROM and as), and (From and newline character). Input: FROM some_registry as registry1 FROM another_

How can I change the order of some string in a filename

I have lots of files like these: tf_CVBV6Z_CVSA1Z_pws2_pcc1.sac tf_CVBV5Z_CVSA2Z_pws2_pcc1.sac tf_CVBV4Z_CVSA3Z_pws2_pcc1.sac tf_CVBV3Z_CVSA4Z_pws2_pcc1.sac tf

Replace same occurrence of word with different words using sed

I want to replace 2 same words in file(app.properties) with 2 different words using sed command. Example: mysql.host=<<CHANGE_ME>> mysql.username=te

Combining mapfile, command redirection and exit status retrieval

I am reading a build command as so: mapfile -t make_out < <(2>&1 ./make.sh my_program) I would like to print the output kept in make_out only if t

ignoring specific exit code in bash

Note: Question does not duplicate Ignoring specific errors in a shell script . Suppose it is needed to capture the leading characters of a encoded representati

How to overwrite a multiline string in bash?

I have this code snippet, which allows to overwrite a string in bash if used multiple times: echo -ne "String 1 \r" echo -ne "String 2 \r" Output: String 2

How to find the location of a bash file?

I've made an executable .jar file for a terminal game I've been working on. So far, I opened it by typing java -jar name.jar in the Terminal. This worked, but w

Can't Run Go Bin In Terminal

I have been executing my Golang code on Visual Studio in the terminal for the past few weeks. All of a sudden I am trying to run a program I made, and it does n

Can't Run Go Bin In Terminal

I have been executing my Golang code on Visual Studio in the terminal for the past few weeks. All of a sudden I am trying to run a program I made, and it does n

How to be explicit about intentional word splitting?

I'm running shellcheck on my scripts and often get this warning (which in this case is correct, because cd foo bar baz makes no sense): cd ${SOME_DIR} || exit 1

How can I loop with all the nc -zv connections?

I am trying to write a script to monitor all the server ports. But I am able write to for only one connection at a time. How can I write it for all the connecti