Check These Out
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
Kodi needs the youtube plugin to be installed.
This will make a false directory with the same file names as whatever directory you choose. This is wise to use when testing scripts that alter contents, filenames, or move files. I wrote this after an OOPS I made when renaming a directory of JPGs, PNGs, PSDs that were mixed. I recommend this as I lost over 2000 vacation pictures and some graphics I designed for software and web sites. :(
NOTE: This only creates name copies, that data itself is not copied.
I've used this scan to sucessfully find many rogue APs on a very, very large network.
Prints the unique IP Addresses as they arrive from an Apache `access.log` file.
The '-W interactive' tells awk to start writing to stdout immediately and not buffer the output.
This command builds on the uniq lines without sorting command (http://www.commandlinefu.com/commands/view/4389/remove-duplicate-entries-in-a-file-without-sorting.)
This command finds all the files whose status has changed between the ctime of the older and newer .
Very useful if you can see from an ls listing a block of consecutive files you want to move or delete, but can't figure out exactly the time range by date.
64 elements max on 16 rows, 4 cols.
GNU Barcode will adapt automagically the width and the eight of your elements to fill the page.
Standard output format is PostScript.
underline() will print $1, followed by a series of '=' characters the width of $1. An optional second argument can be used to replace '=' with a given character.
This function is useful for breaking lots of data emitted in a for loop into sections which are easier to parse visually. Let's say that 'xxxx' is a very common pattern occurring in a group of CSV files.
You could run
$ grep xxxx *.csv
This would print the name of each csv file before each matching line, but the output would be hard to parse visually.
$ for i in *.csv; do printf "\n"; underline $i; grep "xxxx" $i; done
Will break the output into sections separated by the name of the file, underlined.