Convert lowercase to uppercase in the case of excel file using shell script

Bash
I am able to convert lower case to upper case for CSV files. Code example: tmpf=`tempfile`.csv cat $3 | tr "[:lower:]" "[:upper:]" | tr -d "\\r\\00...
1 year ago

Shell script - search for a line and display line and 3 trailing lines

Bash
I'm writing a script that will search for a query and when found it will display that line plus 3 trailing lines. I've no problem finding that line an...
1 year ago

for each line of a file, grep a specific string and make string substitution

Bash
I have a file containing more than 14000 records. What I want to do is to process this file line by line and replace a String by anodher string return...
1 year ago

What's the magic of "-" (a dash) in command-line parameters?

Bash
Examples: Create an ISO image and burn it directly to a CD. mkisofs -V Photos -r /home/vivek/photos | cdrecord -v dev=/dev/dvdrw - Change to the ...
1 year ago

Openssl output hanging when getting -enddate

Bash
I've have been working on a script to get some certificate details and not that I've got the formatting on its way to being ironed out the script now ...
1 year ago

How to copy files if size nonzero in shell?

Bash
I have some files that I want to copy from one directory to another with a shell script but I only want to copy the ones that have something in them. ...
1 year ago

how to configure multiple shell scripts on Jenkins and run them without waiting for the other script

Bash
I am trying to run a shell script from jenkins which is of the following form ssh host1 'nohup path/script.sh &' ssh host2 'nohup path/script.sh...
1 year ago

Run process/script in background using nohup

Bash
I am trying to run a couple of scripts relating to apache storm. I execute the commands through ssh and all these commands are executed on the same re...
1 year ago

payload is not valid JSON

Bash
I'm using curl to send JSON to an API endpoint. However, somewhere in the bash chain it is getting messed up. Is there something special to know abou...
1 year ago

delete all directories except one

Bash
So using the shell, and having a directory: ./parent ./parent/one ./parent/two ./parent/three ./parent/four i want to do something like rm -rf pare...
1 year ago

How to get the exit status a loop in bash

Bash
I know how to check the status of the previously executed command using $?, and we can make that status using exit command. But for the loops in bash ...
1 year ago

Check for a process whenever I open gvim

Bash
I want to see if a process is running whenever I open a file using vim/gvim. I added the following in .vimrc: ps -ef | grep -v grep | grep <proce...
1 year ago

-bash: : command not found when launching the shell in Mac OSX

Bash
Lately I tried to made some changes to paths in my .bash_profile. After I tried to validate these changes with source .bash_profile and got -bash: : ...
1 year ago

Find Git branch name in post-update hook

Bash
I'm executing a programme to alert CruiseControl each time an update is sent to our remote repository. I'm using a Git post-update hook for this. It ...
1 year ago

In the shell, what does " 2>&1 " mean?

Bash
In a unix shell, if I want to combine stderr and stdout into the stdout stream for further manipulation, I can append the following on the end of my c...
1 year ago

I need to find .c files a specified directory

Bash
I have directory named dir/sub_dir and in that directory I have *.c files: add_num.c sub_num.c mul_num.c div_num.h exp.txt ...
1 year ago

bc (standard_in) 1: syntax error

Bash
I am trying to find the location of myfunc in the executable of: #include <stdio.h> void myfunc(){ printf("Hello"); } int main(){ } I ...
1 year ago

Bash : if condition - check if element is present in array

Bash
I was wondering if there is an efficient way to check if an element is present within an array in Bash? I am looking for something similar to python ...
1 year ago

Best(?) way to make a popup menu for semi-portable shell scripts?

Bash
Basically I would love to say: echo `grep ^foo /usr/share/dict/words | popup_menu` ...and have some type of keyboard navigable menu popup or sele...
1 year ago

Use the contents of a file to replace a string using SED

Bash
What would be the sed command for mac shell scripting that would replace all iterations of string "fox" with the entire string content of myFile.txt. ...
1 year ago