(Adapted from this: Join Manual, Header lines). I am sorting a file called file1 with this content: If I just write: sort -k2b,2 file1 I get: ...
(Adapted from this: Join Manual, Header lines). I am sorting a file called file1 with this content: If I just write: sort -k2b,2 file1 I get: ...
I have several kinds of buildA.sh, buildB.sh, ... scripts which compile some codes. I also have a general script common.sh which do pre-process, set e ...
I have found the answer to get my code to work but I want to know why it works and my code doesn't This code will go though only one sub directory ...
I have a bash function that looks like this: This function, while not entirely relevant, will build a banner. All params, after the initial 2, are ...
I'm in a NodeJS command-prompt session and I want to dip out to shell for a few commands and come back to my session with variables intact. I remembe ...
I have the below code to find out the number of instances of current script running that is running with same arg1. But looks like the script creates ...
Bash subshells (cmd1;cmd2) whill run in a sub bash process, while it can access the variable not exported, how this can be? Meanwhile, bash -c structu ...
Im trying to modify array to manage some functionality. I want to access the array lst from the subshell or use somtheing that isnt command substituti ...
I have a script with the following command to upload a bunch of zip files to a site: The intention is that if any file fail to upload with the reas ...
The process in context here is 'android build environment'. To timeout normal tasks, one would do However, when I try the same with android build e ...
When making functions within a script it bash, it appears that people often have the function run within a subshell, ie instead of What are the ...
This is my bash script. I want to pass a command as an argument and run it. case 1) is not working case 2) is working well. How can I make ca ...
I have a bash script that reads in lots of dates in epoch time, and determines the (local) hour of the day at which they occurred. Relevant snippet: ...
I'm looping over a large file, on each line I'm running some commands, when they finish I want the entire output to be appended to a file. Since ther ...
Let's assume the following script: While running it with this command: ./non_secure_script 1 I get the following error: if: command not found How ...
I have a bash script my_script which executes: now, when I run this script from an interactive shell session, scp lists files as it copies them. Bu ...
Im exploring a bit on shell scripts and wrote this script. When the build command fails, it has to provide an error message and exit. I know that exi ...
(forgive me for spamming, I should have adjusted the original question, but it felt like I ran into a new hurdle when solving the problem) I set a go ...
Sometimes shell commands behave unexpectedly because of subshells-processes. A recent example I experienced was that this command won't work because ...
I have a shell script written by some vendor and does a lot of low level stuffs under the hood which I have no domain specific knowledge on. I have a ...