2017-01-27 04:51 pm

How to ppen a file in a tab in vim in readonly mode on Linux, MacOS and Unix system

Want to open a file in read-only mode on Unix, try:
vim -M file
OR open a tab in read-only mode:
: view file



More info: Open a file or a tab in vim in readonly mode
2017-01-24 05:02 pm
Entry tags:

curl ignore invalid ssl certificate warning



Want to ignore SSL warning with curl command on Linux/Unix/MacOS? Try:

curl -k url
curl -k -I url


More info: cURL Ignore SSL Certificate Warnings
2017-01-23 11:26 pm

The Awk Programming Language for all {PDF version}

AWK is a programming language designed for text processing and typically used for a data extraction and reporting tool. It is a standard feature of Linux, FreeBSD, OpenBSD, MacOS and most Unix-like systems.



Download: The AWK programming book (PDF version)
2017-01-23 05:26 pm

Directly attach screen/tmux over ssh session & save a useless parent bash process:

Run the following command:

ssh -t box screen -r
ssh -t box tmux a
ssh -t user@server screen -r
ssh -t user@server tmux a

2017-01-23 04:12 pm
Entry tags:

How to determine if a bash variable is empty in a Linux or Unix?



My shell script depends upon user input. How do I find out if a variable called $_JAIL path is empty under a Linux / Apple OS X / Unix like operating systems? What is the best way to determine if a variable in bash is empty?

Pass the -z option to the if command or conditional expression.

Read more here