Check These Out
the `jq` tool can also be used do validate json files and pretty print output
`cat file.json | jq`
available on several platforms, including newer debian-based systems via `#sudo apt install jq`, mac via `brew install jq`, and from source
https://stedolan.github.io/jq/download/
This ran on a ubuntu box using espeak for speaking text with the bash shell. On a mac you should use 'say'. Also you can change your alarm interval and your snooze interval which are currently 8 hours and 1 minute. I would run this via cron yet it's easier to disable if you run it as a command like this :P
Another way of doing it that's a bit clearer. I'm a fan of readable code.
Shorten any Url using bit.ly API, using your API Key which enables you to Track Clicks
I have it as a Function in my .bash_aliases
[code]
shorten ()
{
longUrl=$1;
curl "http://api.bit.ly/shorten?version=2.0.1&longUrl=LONG_URL_YOU_WANT_SHORTENED&login=rungss&apiKey="
}
[/code]
Here is an Output showing the Function Detail..
[konsole]
bijay@bijay:$ type shorten
shorten is a function
shorten ()
{
longUrl=$1;
curl "http://api.bit.ly/shorten?version=2.0.1&longUrl=$longUrl&login=rungss&apiKey=R_48d7e0b40835b09e3861bd455f7abec7"
}
[/konsole]
this command from the source server and this follow in the destination server:
ssh user@localhost -p 8888
This is a equivalent to the GNU ' readlink' tool, but it supports following all the links, even in different directories.
An interesting alternative is this one, that gets the path of the destination file
$ myreadlink() { [ ! -h "$1" ] && echo "$1" || (local link="$(expr "$(command ls -ld -- "$1")" : '.*-> \(.*\)$')"; cd $(dirname $1); myreadlink "$link" | sed "s|^\([^/].*\)\$|$(dirname $1)/\1|"); }
That will open vi with the four README files in different viewports.
Specially handy when you find there is only one file matching your pattern and you don't want to specify the full path.