Check These Out
^Hexadecimal Ten minus Octal Ten is Eight(in Decimal).
$ echo "$(( 0xaf )) = $(( 0257 ))"
^Hexadecimal AF and Octal 257 are both Decimal 175.
Continue a current job in the background and detach it from current terminal
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials
Simple and easy to remember, if it already exists then it just ignores it.
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
http://alvinalexander.com/linux/unix-linux-process-memory-sort-ps-command-cpu for an overview of --sort available values
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
Nothing fancy it just converts one file from one character encoding into another one.
Evoke from the command like as:
$ timeDNS commandlinefu.com
.
This isn't too terribly practical, but it is a good code example of using subshells to run the queries in parallel and the use of an "anonymous function" (a/k/a "inline group") to group i/o.
.
I'm assuming you have already defined your local DNS cache as ${local_DNS}, (here, it's 192.168.0.1).
.
You do need to install `moreutils` to get `sponge`.
.
If you're willing to wait, a slower version w/o sponge, (and w/o sorting), is this:
.
DNS () { for x in "192.168.0.1" "208.67.222.222" "208.67.220.220" "198.153.192.1" "198.153.194.1" "156.154.70.1" "156.154.71.1" "8.8.8.8" "8.8.4.4"; do (echo -n "$x "; dig @"$x" "$*"|grep Query) ; done ; }