Linux command to get time in milliseconds

Bash
Is there shell command in Linux to get the time in milliseconds?
1 year ago

Bash if statement, with a grep from a file -eq 0 from $?

Bash
I am trying to get this little script to work, to tell me if I have one of two options enabled. It seems to work on the first if statement, but doesn'...
1 year ago

Why produces this code a "assignment from incompatible pointertype" warning?

Bash
I'm writing a shell at my own and I'm always getting this warning "assignment from incompatible pointertype" for the following code(just the important...
1 year ago

Printing lines if a specific column contains values >0

Bash
I have a tab-delimited .txt file in this format, containing numerous symbols, numerals and letters: MUT 124 GET 288478 0 * = 288478 0 MUT...
1 year ago

Where does, Carp library in Perl, print logs when run from crontab

Bash
I have a Perl script that uses Carp (carp croak) to print info and errors. When run directly I can see the output on console. But when I am running th...
1 year ago

R system functions always returns error 127

Bash
I need to execute external tool from R and process errors (if any) occurred in that tool. I know 3 functions to do something familiar with my task: ...
1 year ago

Grep user input to find number

Bash
I have a File which looks like this example text [1234] [0] Part 2 /var/tmp/path example text [1234] [0] Part 3 /var/tmp/path example text [1234] [0]...
1 year ago

How to execute a command and get output of command within C++?

Bash
I am looking for a way to get the output of a command when it is run from within a C++ program. I have looked at using the system() function, but tha...
1 year ago

regex to find lines starting with `*` and ending with `)` in eclipse using regex search

Bash
I am trying to use this regular expressing in Eclipse to find the lines mentioned below. I have a text file text.txt: teeet() *test() *test * () te...
1 year ago

convert hex characters in a file to ASCII using a shell script

Bash
I have a file values who contains a string of hex characters. \x41\x42\x43\x44\x45 I can encode it to the binary values using for example printf: p...
1 year ago

I just assigned a variable, but echo $variable shows something else

Bash
Here are a series of cases where echo $var can show a different value than what was just assigned. This happens regardless of whether the assigned val...
1 year ago

Unix - Only list directories which contains a subdirectory

Bash
How can I print in the Unix shell the number of directories in a tree which contain other directories? I haven't found a solution yet with commands l...
1 year ago

Bash 'printf' equivalent for command prompt?

Bash
I'm looking to pipe some String input to a small C program in Windows's command prompt. In bash I could use $ printf "AAAAA\x86\x08\x04\xed" | ./pro...
1 year ago

How to use the unix/shell paste command for several files

Bash
I have five csv files, which I would like to paste together using the shell function. This basically performs a concatenation of the rows in several t...
1 year ago

What is the right way to set up HBase, hadoop, hive to access Hbase through hive?

Bash
I have a problem with configuring and installing hbase/hadoop/hive. What I did so far on an VM with ubuntu 14.04.3 LTS: installed jdk like this with...
1 year ago

How can I use parameters in a bash script as subject text to grep?

Bash
I have a simple bash script, which receives a file with subject text, and processes line by line. If the line begins with certain characters - then r...
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

Linux: copy and create destination dir if it does not exist

Bash
I want a command (or probably an option to cp) that creates the destination directory if it does not exist. Example: cp -? file /path/to/copy/file/t...
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 to echoing data from WHOIS records with grep (redirecting standard output into a variable)

Bash
I have this bash script: How I can call it the grep's output in the if else statement? If I suppress the output of the grep command with -q, also wil...
1 year ago