Tagged: bash

0

Returning a value from a node child process

One can execute Linux, git shell commands from node script using node’s child process API like exec, execSync. But when you want to save the return value outside of the function scope, one must...

0

How to run node script from BASH?

Below shell script is running a node script, which gets an object from package.json, updates the app version and writes it back to the package.json using node API. // foo.sh node <<EOF var fs...

0

can not run shell script from command line on mac

To run any script you need to have executable write of that script. chmod 755 ./script_name.sh chmod 755 – gives you full permission. It gives only read and execute permission to everyone else.

0

-nt file test operator in bash

File based condition for if statements in bash Condition: [ newerfile -nt olderfile ] Description: newerfile was changed more recently than olderfile, or if newerfile exists and olderfile doesn’t. Example: if [ file1.txt -nt...

0

How to sudo in windows

There is no sudo command in windows. But you can run the command prompt with admin privileges by right clicking the it and selecting run as administrator.

0

Autocomplete cli from history

Use the following steps to do the reverse search in your bash history. $ Ctrl + R $(reverse-i-search)`’: [start typing command…] [Tab/Enter] – Tab will complete the command and brings back the CLI. -...