Check These Out
This is a command that I find myself using all the time. It works like regular grep, but returns the paragraph containing the search pattern instead of just the line. It operates on files or standard input.
$ grepp
or
$ | grepp
Thanks to the authors of:
$ awk '!x[$0]++'
and the author of:
$ joinargs() { (local IFS="$1"; shift && echo "$*") }
and others, we can have a fast Linux or android.
IMPORTANT if you find a priority order problem in PATH you can push a path directory to the front without duplication as follows:
$ PATH=/bin:$PATH
then ...
Check duplication with:
$ echo $PATH|tr : '\n'|sort|uniq -d
Finally do a very neat line by line list of $PATH:
$ echo "${PATH//:/$'\n'}
The speed up is very noticeable for android, and builds on Linux Ubantu are much faster with make and scripts.
I will update the command on request. Timothy from SONY
email random list can be created here: https://www.randomlists.com/email-addresses
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits.
An error message of the command itself is suppressed for clarity purpose.
Convert some decimal numbers to binary numbers. You could also build a general base-converter:
$ function convBase { echo "ibase=$1; obase=$2; $3" | bc; }
then you could write
$ function decToBun { convBase 10 2 $1; }
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
Create a binary clock.
This shell function displays a list of binaries contained in an installed package; works on Debian based Linux distributions.