{"id":3645,"date":"2017-10-29T21:30:49","date_gmt":"2017-10-29T12:30:49","guid":{"rendered":"http:\/\/www.catracing.org\/hendrb\/?p=3645"},"modified":"2017-10-29T21:30:49","modified_gmt":"2017-10-29T12:30:49","slug":"os-x-random-quote-generator-v1-1m","status":"publish","type":"post","link":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/","title":{"rendered":"OS X &#8211; Random Quote Generator v1.1m"},"content":{"rendered":"<h1 style=\"text-align: center;\"><span style=\"color: #0000ff;\"><a href=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3651 size-thumbnail\" src=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg\" alt=\"\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg 150w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-100x100.jpeg 100w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal.jpeg 225w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/span><span style=\"color: #0000ff;\">MacOS X \u2013 BASH Scripting<\/span><\/h1>\n<h1 style=\"text-align: center;\"><span style=\"color: #0000ff;\">Random Quote Generator v1.1m<\/span><\/h1>\n<hr>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ffffff;\">I know it has been a while since I have posted a new blog! I deeply apologize, I have been suffering from a severe case of writers block, and have been struggling to come up with a new technical article that is up to the standards I have set for myself!&nbsp; Looking back at some of the old articles, I realized that one of my favorites is woefully out of date!<\/span><\/p>\n<p><span style=\"color: #ffffff;\">For those of you who may be visiting Brent\u2019s World for the first time, I converted a C-Net Amiga BBS Arexx script to BASH v4 back in February 2015 ( http:\/\/www.catracing.org\/hendrb\/fun-with-bash-scripts-random-quote-generator\/ ), then followed it up with displaying the output through cowsay for some extra fun,&nbsp;<\/span><a href=\"http:\/\/www.catracing.org\/hendrb\/fun-with-bash-scripts-randquote-v1-1\/\"><span style=\"color: #00ffff;\">http:\/\/www.catracing.org\/hendrb\/fun-with-bash-scripts-randquote-v1-1\/<\/span><\/a>.&nbsp; <span style=\"color: #ffffff;\">For an encore I provided instructions on installing BASH v4 and GNUsed on MacOS X&nbsp; so Mac users could also enjoy a random quote every time they launched their terminal.app.<\/span><\/p>\n<p><a href=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2015\/11\/Cowsay.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2056 size-full\" src=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2015\/11\/Cowsay.jpg\" alt=\"\" width=\"333\" height=\"137\" srcset=\"https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2015\/11\/Cowsay.jpg 333w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2015\/11\/Cowsay-300x123.jpg 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/a><\/p>\n<p>So let\u2019s bring the OS X version of randquote.sh up to date, since the previous instructions only covered Linux users.&nbsp; <span style=\"color: #ff0000;\">Please make sure you already have Randquote v1.0, BASHv4 and GNUsed already installed and working.&nbsp;<\/span> If you do not please follow the steps outlined here, <a href=\"http:\/\/www.catracing.org\/hendrb\/os-x-installing-gnu-sed\/\"><span style=\"color: #00ffff;\">http:\/\/www.catracing.org\/hendrb\/os-x-installing-gnu-sed\/<\/span><\/a>.<\/p>\n<p>We will need to install and test cowsay ( I am installing via homebrew, if using another method, you may skip this step.).&nbsp;<\/p>\n<p>Launch your terminal.app, and using a privileged account, Home brew does not work from root, or using sudo.<\/p>\n<p><span style=\"color: #ffff00;\"># brew install cowsay<\/span><\/p>\n<p>Once this is finished we can test cowsay, use either of the 2 methods (I think method 2 is more fun.)<\/p>\n<p><span style=\"color: #ffff00;\">&nbsp;$ man cowsay<\/span><\/p>\n<p>If cowsay is successfully installed, you should now see the man page displayed.<\/p>\n<p><a href=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/osx-cowsay.jpeg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3646 size-large\" src=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/osx-cowsay-1024x595.jpeg\" alt=\"\" width=\"1024\" height=\"595\" srcset=\"https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/osx-cowsay-1024x595.jpeg 1024w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/osx-cowsay-300x174.jpeg 300w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/osx-cowsay-768x446.jpeg 768w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/osx-cowsay.jpeg 1424w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>Let&#8217;s now go ahead and throw something at cowsay, and see what happens<\/p>\n<p><span style=\"color: #ffff00;\">$ cowsay \u201cFor more GREAT blog articles, go to Brent\u2019s World www.catracing.org\u201d<\/span><\/p>\n<p>If cowsay is successfully installed, you should now see the following displayed.<\/p>\n<p><a href=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/Untitled-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3647\" src=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/Untitled-2-300x148.jpg\" alt=\"\" width=\"300\" height=\"148\" srcset=\"https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/Untitled-2-300x148.jpg 300w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/Untitled-2.jpg 576w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now that we know cowsay is installed and working, can go make modifications to bring randquote.sh up to v1.1 on your Mac.<\/p>\n<p>Add the following under the original copyright message, and above the note for MacOS X, &lt;CR&gt; denotes a carriage return, if you are cheating by using copy and paste, you will need to remove them.&nbsp; If you are hand typing the script, simple skip over them.<\/p>\n<p><span style=\"color: #ffff00;\">#<\/span><br \/>\n<span style=\"color: #ffff00;\"> # RandQuote v1.1 (C)22NOV2015 by Brent Hendricks<\/span><br \/>\n<span style=\"color: #ffff00;\"> # Added the ability to display quotes through cowsay.<\/span><br \/>\n<span style=\"color: #ffff00;\"> # cowsay is written by Tomy Monroe (tomy@nog.net)<\/span><br \/>\n<span style=\"color: #ffff00;\"> &lt;CR&gt;<\/span><\/p>\n<p>Below the MacOS X note, and above the ## Get Terminal Width comment add the following.&nbsp; Functions must be written before the main routine of your script.<\/p>\n<p><span style=\"color: #ffff00;\">COWSAY=0<\/span><br \/>\n<span style=\"color: #ffff00;\"> &lt;CR&gt;<\/span><br \/>\n<span style=\"color: #ffff00;\"> ## Get Options<\/span><br \/>\n<span style=\"color: #ffff00;\"> &lt;CR&gt;<\/span><br \/>\n<span style=\"color: #ffff00;\"> while getopts \u201cc\u201d OPTION<\/span><br \/>\n<span style=\"color: #ffff00;\"> do<\/span><br \/>\n<span style=\"color: #ffff00;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case $OPTION in<\/span><br \/>\n<span style=\"color: #ffff00;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c)<\/span><br \/>\n<span style=\"color: #ffff00;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COWSAY=1<\/span><br \/>\n<span style=\"color: #ffff00;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<\/span><br \/>\n<span style=\"color: #ffff00;\"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;esac<\/span><br \/>\n<span style=\"color: #ffff00;\"> done<\/span><br \/>\n<span style=\"color: #ffff00;\"> &lt;CR&gt;<\/span><\/p>\n<p>Next we will cursor down to the ## Read Quote from Quote file, and add the following.<\/p>\n<p>After gsed -n \u201c${RECORD},+5p\u201d $QUOTATIONS &gt; $TEMP_QUOTATION<\/p>\n<p>Highlight and copy the following, <span style=\"color: #ffff00;\">gsed -e :a -e \u201cs\/^.\\{1,${TERMWIDE}\\}$\/ &amp;\/;ta\u201d -e \u2018s\/\\( *\\)\\1\/\\1\/\u2019 $TEMP_$<\/span><\/p>\n<p>Delete&nbsp; the line and add the following.<\/p>\n<p><span style=\"color: #ffff00;\">&lt;CR&gt;<\/span><br \/>\n<span style=\"color: #ffff00;\"> if [ $COWSAY -eq 0 ]<\/span><br \/>\n<span style=\"color: #ffff00;\"> then<\/span><br \/>\n<span style=\"color: #ffff00;\"> Paste the line you cut from above. \u2018gsed -e :a -e \u201cs\/^.\\{1,${TERMWIDE}\\}$\/ &amp;\/;ta\u201d -e \u2018s\/\\( *\\)\\1\/\\1\/\u2019 $TEMP_$\u2019<\/span><br \/>\n<span style=\"color: #ffff00;\"> else<\/span><br \/>\n<span style=\"color: #ffff00;\"> cat ${TEMP_QUOTATION} | cowsay<\/span><br \/>\n<span style=\"color: #ffff00;\"> fi<\/span><\/p>\n<p>The rest of the file remains untouched.&nbsp; The entire listing should look like this.<\/p>\n<p><span style=\"color: #ffff00;\">1 #!\/bin\/bash4<\/span><br \/>\n<span style=\"color: #ffff00;\"> 2 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 3 # BASH script to display RANDOM QUOTE and center text depending on terminal width.<\/span><br \/>\n<span style=\"color: #ffff00;\"> 4 # BASH script and quotation taken from CNET Amiga 2 AREXX PFILE<\/span><br \/>\n<span style=\"color: #ffff00;\"> 5 # AMIGA Version Copyright 1992 Jim Selleck and Beverly James Products<\/span><br \/>\n<span style=\"color: #ffff00;\"> 6 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 7 # BASH Script and blog article (C)24MAY2015 By Brent Hendricks<\/span><br \/>\n<span style=\"color: #ffff00;\"> 8 # Scirpt and Quotes are public domain, the accompanying BLOG may only be used with permission.<\/span><br \/>\n<span style=\"color: #ffff00;\"> 9 # Contact brent.hendricks@catracing.org if you wish to republish the article.<\/span><br \/>\n<span style=\"color: #ffff00;\"> 10 # Please visit Brent&#8217;s World @ www.catracing.org\\hendrb<\/span><br \/>\n<span style=\"color: #ffff00;\"> 11 #<\/span><br \/>\n<span style=\"color: #ffff00;\"> 12 # RandQuote v1.1 (C)22NOV2015 by Brent Hendricks<\/span><br \/>\n<span style=\"color: #ffff00;\"> 13 # Added the ability to display quotes through cowsay.<\/span><br \/>\n<span style=\"color: #ffff00;\"> 14 # cowsay is writen by Tomy Monroe (tomy@nog.net)<\/span><br \/>\n<span style=\"color: #ffff00;\"> 15 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 16 # NOTE: In order to make this script function properly with LINUX a compatibility <\/span><br \/>\n<span style=\"color: #ffff00;\"> 17 # checking routine was added. If you are using OSX you MUST download and install GNUsed<\/span><br \/>\n<span style=\"color: #ffff00;\"> 18 # The easiest way to do this is to install HOMEBREW. <\/span><br \/>\n<span style=\"color: #ffff00;\"> 19 # HOMEBREW can be installed by going to www.brew.sh<\/span><br \/>\n<span style=\"color: #ffff00;\"> 20 # Once installed use $brew install gnu-sed<\/span><br \/>\n<span style=\"color: #ffff00;\"> 21 # This script will automatically use GNU-sed (gsed)<\/span><br \/>\n<span style=\"color: #ffff00;\"> 22 # if using OSX.<\/span><br \/>\n<span style=\"color: #ffff00;\"> 23 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 24 COWSAY=0<\/span><br \/>\n<span style=\"color: #ffff00;\"> 25 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 26 ## Get Options<\/span><br \/>\n<span style=\"color: #ffff00;\"> 27 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 28 while getopts \u201cc\u201d OPTION<\/span><br \/>\n<span style=\"color: #ffff00;\"> 29 do<\/span><br \/>\n<span style=\"color: #ffff00;\"> 30 case $OPTION in<\/span><br \/>\n<span style=\"color: #ffff00;\"> 31 c)<\/span><br \/>\n<span style=\"color: #ffff00;\"> 32 COWSAY=1<\/span><br \/>\n<span style=\"color: #ffff00;\"> 33 ;;<\/span><br \/>\n<span style=\"color: #ffff00;\"> 34 esac<\/span><br \/>\n<span style=\"color: #ffff00;\"> 35 done<\/span><br \/>\n<span style=\"color: #ffff00;\"> 36 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 37 ## Get Terminal Width<\/span><br \/>\n<span style=\"color: #ffff00;\"> 38 TERMWIDE=&#8221;$(tput cols)&#8221;<\/span><br \/>\n<span style=\"color: #ffff00;\"> 39 ((TERMWIDE = TERMWIDE -3 ))<\/span><br \/>\n<span style=\"color: #ffff00;\"> 40 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 41 ## Set file path<\/span><br \/>\n<span style=\"color: #ffff00;\"> 42 QUOTATIONS=~\/shell_scripts\/logon\/randquote\/quotations<\/span><br \/>\n<span style=\"color: #ffff00;\"> 43 TEMP_QUOTATION=~\/shell_scripts\/logon\/randquote\/temp_quotation<\/span><br \/>\n<span style=\"color: #ffff00;\"> 44 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 45 ## get number of quoatations<\/span><br \/>\n<span style=\"color: #ffff00;\"> 46 QUOTES=&#8221;$(cat $QUOTATIONS | wc -l)&#8221;<\/span><br \/>\n<span style=\"color: #ffff00;\"> 47 ((QUOTES = QUOTES \/ 5))<\/span><br \/>\n<span style=\"color: #ffff00;\"> 48 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 49 ## Pick A Record<\/span><br \/>\n<span style=\"color: #ffff00;\"> 50 RECORD=$((RANDOM % $QUOTES *5))<\/span><br \/>\n<span style=\"color: #ffff00;\"> 51 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 52 ## Read Quote from QUOTATIONS file<\/span><br \/>\n<span style=\"color: #ffff00;\"> 53 gsed -n &#8220;${RECORD},+5p&#8221; $QUOTATIONS &gt; $TEMP_QUOTATION<\/span><br \/>\n<span style=\"color: #ffff00;\"> 54 <\/span><br \/>\n<span style=\"color: #ffff00;\"> 55 if [ $COWSAY -eq 0 ]<\/span><br \/>\n<span style=\"color: #ffff00;\"> 56 then<\/span><br \/>\n<span style=\"color: #ffff00;\"> 57 gsed -e :a -e &#8220;s\/^.\\{1,${TERMWIDE}\\}$\/ &amp;\/;ta&#8221; -e &#8216;s\/\\( *\\)\\1\/\\1\/&#8217; $TEMP_QUOTATION<\/span><br \/>\n<span style=\"color: #ffff00;\"> 58 else<\/span><br \/>\n<span style=\"color: #ffff00;\"> 59 cat ${TEMP_QUOTATION} | cowsay<\/span><br \/>\n<span style=\"color: #ffff00;\"> 60 fi<\/span><br \/>\n<span style=\"color: #ffff00;\"> 61 ## Remove $TEMP_QUOTATION scractch file<\/span><br \/>\n<span style=\"color: #ffff00;\"> 62 # rm -f &#8220;${TEMP_QUOTATION}&#8221;<\/span><br \/>\n<span style=\"color: #ffff00;\"> 63 exit 0<\/span><\/p>\n<p>Save the file, and let\u2019s go ahead and test our modifications to make sure everything works.<\/p>\n<p>&nbsp;<\/p>\n<p>First let\u2019s see if we can output the quotation through cowsay.&nbsp; At your shell prompt, type.<\/p>\n<p><span style=\"color: #ffff00;\">$ .\/randquote.sh \u2013c<\/span><\/p>\n<p>If everything is working as advertised, you should see the following output.<\/p>\n<p><a href=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OSX-Cowsay-output.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3648\" src=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OSX-Cowsay-output-300x150.jpg\" alt=\"\" width=\"300\" height=\"150\" srcset=\"https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OSX-Cowsay-output-300x150.jpg 300w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OSX-Cowsay-output.jpg 634w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Just to be on the safe side, let us also test the nomal output without the \u2013c option. At your shell prompt enter the following.<\/p>\n<p><span style=\"color: #ffff00;\">$ .\/randquote.sh<\/span><\/p>\n<p>If everything is working correctly, we will now replace randquote 1.0 with v1.1.&nbsp; At your shell prompt type.<\/p>\n<p><span style=\"color: #ffff00;\">$ cp .\/randquote.sh ~\/shell_scripts\/logon\/randquote<\/span><\/p>\n<h5>That is all there is to it!&nbsp; I hope you enjoyed this weeks MacOS X Technical Blog, and come back next week for more great articles! &nbsp;If you wish to be notified when new content is posted, you may become a registered user by clicking <a href=\"http:\/\/www.catracing.org\/hendrb\/wp-login.php\"><span style=\"color: #ff0000;\">here.<\/span><\/a><\/h5>\n","protected":false},"excerpt":{"rendered":"<p>MacOS X \u2013 BASH Scripting Random Quote Generator v1.1m &nbsp; I know it has been a while since I have posted a new blog! I deeply apologize, I have been suffering from a severe case of writers block, and have <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":["post-3645","post","type-post","status-publish","format-standard","hentry","category-technical"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OS X - Random Quote Generator v1.1m - Brent&#039;s World<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OS X - Random Quote Generator v1.1m - Brent&#039;s World\" \/>\n<meta property=\"og:description\" content=\"MacOS X \u2013 BASH Scripting Random Quote Generator v1.1m &nbsp; I know it has been a while since I have posted a new blog! I deeply apologize, I have been suffering from a severe case of writers block, and have &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\" \/>\n<meta property=\"og:site_name\" content=\"Brent&#039;s World\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Brents-World-912767498915017\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/Brents-World-912767498915017\" \/>\n<meta property=\"article:published_time\" content=\"2017-10-29T12:30:49+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg\" \/>\n<meta name=\"author\" content=\"Brent Hendricks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brent Hendricks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\"},\"author\":{\"name\":\"Brent Hendricks\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\"},\"headline\":\"OS X &#8211; Random Quote Generator v1.1m\",\"datePublished\":\"2017-10-29T12:30:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\"},\"wordCount\":1066,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\"},\"image\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg\",\"articleSection\":[\"Technical\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\",\"url\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\",\"name\":\"OS X - Random Quote Generator v1.1m - Brent&#039;s World\",\"isPartOf\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg\",\"datePublished\":\"2017-10-29T12:30:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage\",\"url\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg\",\"contentUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.catracing.org\/hendrb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OS X &#8211; Random Quote Generator v1.1m\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#website\",\"url\":\"https:\/\/www.catracing.org\/hendrb\/\",\"name\":\"Brent&#039;s World\",\"description\":\"Your weekly dose of the life of Brent!\",\"publisher\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.catracing.org\/hendrb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\",\"name\":\"Brent Hendricks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\",\"url\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\",\"contentUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\",\"width\":4480,\"height\":6720,\"caption\":\"Brent Hendricks\"},\"logo\":{\"@id\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\"},\"sameAs\":[\"http:\/\/www.catracing.org\",\"https:\/\/www.facebook.com\/Brents-World-912767498915017\"],\"url\":\"https:\/\/www.catracing.org\/hendrb\/author\/hendrb01\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OS X - Random Quote Generator v1.1m - Brent&#039;s World","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/","og_locale":"en_US","og_type":"article","og_title":"OS X - Random Quote Generator v1.1m - Brent&#039;s World","og_description":"MacOS X \u2013 BASH Scripting Random Quote Generator v1.1m &nbsp; I know it has been a while since I have posted a new blog! I deeply apologize, I have been suffering from a severe case of writers block, and have &hellip; Continue reading &rarr;","og_url":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/","og_site_name":"Brent&#039;s World","article_publisher":"https:\/\/www.facebook.com\/Brents-World-912767498915017","article_author":"https:\/\/www.facebook.com\/Brents-World-912767498915017","article_published_time":"2017-10-29T12:30:49+00:00","og_image":[{"url":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg","type":"","width":"","height":""}],"author":"Brent Hendricks","twitter_misc":{"Written by":"Brent Hendricks","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#article","isPartOf":{"@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/"},"author":{"name":"Brent Hendricks","@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442"},"headline":"OS X &#8211; Random Quote Generator v1.1m","datePublished":"2017-10-29T12:30:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/"},"wordCount":1066,"commentCount":0,"publisher":{"@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442"},"image":{"@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage"},"thumbnailUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg","articleSection":["Technical"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/","url":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/","name":"OS X - Random Quote Generator v1.1m - Brent&#039;s World","isPartOf":{"@id":"https:\/\/www.catracing.org\/hendrb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage"},"image":{"@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage"},"thumbnailUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg","datePublished":"2017-10-29T12:30:49+00:00","breadcrumb":{"@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#primaryimage","url":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg","contentUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2017\/10\/OS-X-Terminal-150x150.jpeg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.catracing.org\/hendrb\/os-x-random-quote-generator-v1-1m\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.catracing.org\/hendrb\/"},{"@type":"ListItem","position":2,"name":"OS X &#8211; Random Quote Generator v1.1m"}]},{"@type":"WebSite","@id":"https:\/\/www.catracing.org\/hendrb\/#website","url":"https:\/\/www.catracing.org\/hendrb\/","name":"Brent&#039;s World","description":"Your weekly dose of the life of Brent!","publisher":{"@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.catracing.org\/hendrb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442","name":"Brent Hendricks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg","url":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg","contentUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg","width":4480,"height":6720,"caption":"Brent Hendricks"},"logo":{"@id":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg"},"sameAs":["http:\/\/www.catracing.org","https:\/\/www.facebook.com\/Brents-World-912767498915017"],"url":"https:\/\/www.catracing.org\/hendrb\/author\/hendrb01\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p43ojH-WN","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/posts\/3645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/comments?post=3645"}],"version-history":[{"count":0,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/posts\/3645\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/media?parent=3645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/categories?post=3645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/tags?post=3645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}