shell/awk -- print certain fields of a row if a column exists in another file

Bash
I have a universe file /tmp/universe.txt aaa bbb ccc I have another csv file, and I only wants to print a certain fields of a row of this csv file...
1 year ago

Suppressing sh script output when using <<END

Bash
I want to insert commands into an interactive environment using the following method: bc &lt;&lt;END 1+1 quit END The output of the example is '2' ...
1 year ago

vim: execute shell command without filtering

Bash
I want to select a block of text (eg. V%) and use the text as input to a shell command (eg. wc or pbcopy) - but I DON'T want to alter the current buff...
1 year ago

Google Cloud platform. npm install - (bash) npm command not found. How to repair Google cloud shell

Bash
I created new project in https://console.developers.google.com . Cloned one project from git, then issued command: curl https://sdk.cloud.google.com ...
1 year ago

Best way to kill all child processes

Bash
I basically want to kill a whole process tree. What is the best way to do this using any common scripting languages. I am looking for a simple solut...
1 year ago

Calling Shell - explorer search in VBA - Workaround

Bash
I have a code in VBA that will call explorer with a given search parameter and will find and list files with a given name in explorer on a specific lo...
1 year ago

How/When does Execute Shell mark a build as failure in Jenkins?

Bash
The horror stories I found while searching for an answer for this one... OK, I have a .sh script which pretty much does everything Jenkins supposed t...
1 year ago

Bash Read Escaped Characters and Normal Characters

Bash
I want to read in bash when any key is pressed, be it arrow key, number, letter, or punctuation, without pressing enter. This is the closest that I h...
1 year ago

command not find in shell script

Bash
Here is my script #!/bin/bash for file in *.ats; do if [["$file" =~ _R079_]]; then rm -f $file fi done It should be simple,delete all the file...
1 year ago

Shell script read file path until file exisits

Bash
The user inputs the file path and the shell script must check for file existence and if the file doesn't exist, prompt for correct path until the corr...
1 year ago

How to assign a variable inside if condition in shell script

Bash
I would like to know how to assign a variable inside if block in shell script.. Below is my code.. if [[ -z "$MMBOX_PATH" || -z "$BACKUP_PATH" || -z...
1 year ago

What's the Android ADB shell "dumpsys" tool and what are its benefits?

Bash
I'm looking for the full list of ADB shell dumpsys commands with a full explanation of all of the commands. Where can I find this information? ...
1 year ago

question mark (?) in shell variable

Bash
I want to use a variable with this name: topMiddleOligocenetoUpperEocene? how can I do it in a shell script (i.e., using the question mark)? I tried:...
1 year ago

How to stop a process running in a shell in a different system?

Bash
Ok, so I am executing a program ./led.sh present in my SBC6845, from my host system using a qt-C++ program. This program basically connects my SBC to ...
1 year ago

How get numbers and sum them in bash shell script?

Bash
I have an input file like this: bread,5 water,15 butter,5 I want to write a script which will get the numbers from each line after the comma and ad...
1 year ago

Execute AutoIt and wait for finish

Bash
I'm needing to implement a macro that runs after autoit and finished running the program it runs the rest of the macro. I tried the Shellandwait(), bu...
1 year ago

Efficient way to get your IP address in shell scripts

Bash
Context: On *nix systems, one may get the IP address of the machine in a shell script this way: ifconfig | grep 'inet' | grep -v '127.0.0.1' | cut -d...
1 year ago

How to programmatically determine the current checked out Git branch

Bash
In a Unix or GNU scripting environment (e.g. a Linux distro, Cygwin, OSX), what is the best way to determine which Git branch is currently checked out...
1 year ago

Scope of variables executing functions in a subshell

Bash
That's what happens when a command is executed in a subshell environment: The command will run in a copy of the current shell execution environment ...
1 year ago

Removed semicolon from a line in php.ini using shell command

Bash
I'd like to removed a semicolon from one of these lines in the php.ini using bash shell command (perhaps using sed). How would I do that? ;extension ...
1 year ago