{"id":355,"date":"2009-04-07T16:57:09","date_gmt":"2009-04-07T22:57:09","guid":{"rendered":"http:\/\/weblog.chrisgrundemann.com\/?p=355"},"modified":"2015-05-22T08:01:54","modified_gmt":"2015-05-22T14:01:54","slug":"push-ksh","status":"publish","type":"post","link":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/","title":{"rendered":"push.ksh &#8211; A Tool for Large Juniper Networks"},"content":{"rendered":"<p>Over the years I have written a few scripts to help me manage the networks I have been responsible for.\u00a0 None of it is earth-shattering I am sure but I think at least some of these tools could be useful to others as well.\u00a0 Not all IP\/Network Engineers (router jockeys) are well versed in scripting languages and all but the smallest networks can benefit from them.\u00a0 So without further adieu, here is the first of what I plan to make a series of posts on <a title=\"Network Tools - don't panic\" href=\"http:\/\/weblog.chrisgrundemann.com\/index.php\/category\/network-tools\/\">Network Tools<\/a>, enjoy!<\/p>\n<h2>push.ksh:<\/h2>\n<p>I wrote push.ksh to &#8220;push&#8221; commands out to several <a title=\"Juniper dot NET\" href=\"http:\/\/www.juniper.net\/\">Juniper<\/a>\/<a title=\"JUNOS Software\" href=\"http:\/\/www.juniper.net\/us\/en\/products-services\/nos\/junos\/\">JUNOS<\/a> routers at once.\u00a0 It is a <a title=\"KornShell\" href=\"http:\/\/kornshell.com\/\">Korn<\/a> shell script which leverages jlogin (an <a title=\"Expect\" href=\"http:\/\/expect.nist.gov\/\">Expect<\/a> script distributed with <a title=\"RANCID\" href=\"http:\/\/www.shrubbery.net\/rancid\/\">RANCID<\/a>).\u00a0 It can basically do one thing, two and a half ways.\u00a0 It can execute the same command on a list of routers or it can run a tailored command on a list of routers.\u00a0 I added the half because when running the same command on all routers, the script can pull the data from a pair of files or from the command line.\u00a0 Push.ksh can be used to do many repetitive tasks across a given group of routers &#8211; including configuration changes.\u00a0 This is a simple script (not unlike most of my scripts) but I have found it invaluable in many situations. The full text of the script is below, after the explanation.<\/p>\n<p>Let&#8217;s first check the dependencies, found in the variables section:<\/p>\n<pre>#-----------Variables--------------#\r\n#** enter the correct paths here **#\r\nPASTE=&lt;path&gt;\/paste_input.pl\r\n#paste_input.pl can be found at http:\/\/odin.chrisgrundemann.com\/files\/scripts\/perl\/\r\nJLOGIN=&lt;path&gt;\/jlogin\r\n#jlogin is an expect script that comes with RANCID (http:\/\/www.shrubbery.net\/rancid\/)\r\n#----------------------------------#<\/pre>\n<p>.<br \/>\nAs you can see, this script is dependent on two others.\u00a0 We touched on jlogin above; if you have RANCID then you probably have jlogin.\u00a0 Try &#8220;&gt; whereis jlogin&#8221; to find the full path.\u00a0 The second script referenced is a <a title=\"perl - Wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Perl\">perl<\/a> script that I adapted from some other perl scripts that my long time colleague <a title=\"Ryan Privette - LinkedIn\" href=\"http:\/\/www.linkedin.com\/in\/rprivette\">Ryan Privette<\/a> has written (full text of the script below).<\/p>\n<p>Next, we take a look at the help output and basic usage:<\/p>\n<pre>&gt; push.ksh --help\r\n\r\nChris wrote this script for personal use.\r\nIf it messes something up that is your fault for\r\nusing it in the first place.\u00a0 By using this script\r\nyou agree to this.\r\n\r\nUsage:\r\npush.ksh -f &lt;file with list of routers&gt; &lt;file with commands for every router&gt;\r\npush.ksh -d &lt;directory where command files are located - named by router host name&gt;\r\npush.ksh -p [you then paste the list of routers and list of commands into the cli]\r\n\r\n&gt;<\/pre>\n<p>There is the disclaimer to keep co-workers from blaming me with there ill advised attempts and then the usage guide.\u00a0 As you can see, there are three options which are all hopefully fairly self explanatory.\u00a0 Let&#8217;s look at each in a bit more detail just in case.<\/p>\n<pre> push.ksh -f &lt;file with list of routers&gt; &lt;file with commands for every router&gt;<\/pre>\n<p>This option should be utilized when you want to execute the exact same command on every router in a given list. Save your list of host names or IPs to act on (whatever you would use to log into the device) in one file and the list of commands to execute in another.\u00a0 Push.ksh will go through the list of routers in the first file one by one and run the commands in the second file on each; displaying the entire output so that you can monitor or capture the results.<\/p>\n<pre> push.sh -d &lt;directory where command files are located - named by router host name&gt;<\/pre>\n<p>This option is used when the commands must be individualized for each router.\u00a0 Generate your commands and save them in files that are named with the host name (or IP) of the router in question.\u00a0 Push.ksh will &#8220;<a title=\"ls - Wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Ls\">ls<\/a>&#8221; the directory supplied, use the contained files names as host names to (attempt to) log into and then execute the commands in that file on that router.\u00a0 Again, all output is displayed.\u00a0 For example:\u00a0 If you want to run &#8220;show interfaces xe-1\/0\/0&#8221; on rtr1 and &#8220;show interfaces xe-2\/1\/0&#8221; on rtr2; you would create a fresh directory (<a title=\"mkdir - Wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Mkdir\">mkdir<\/a>) and create two files inside of it, one called rtr1 (assuming your DNS works) containing &#8220;show interface xe-1\/0\/0&#8221; and another named rtr2 with the line &#8220;show interface xe-2\/1\/0&#8221; as its contents.\u00a0 Then run &#8220;&gt; push.ksh -d &lt;directory you created&gt;&#8221; to have the commands executed on the respective routers.<\/p>\n<pre> push.ksh -p [you then paste the list of routers and list of commands into the cli]<\/pre>\n<p>This final option should be used when you have a command or set of commands to execute on a list of routers but don&#8217;t want to take the time to write files beforehand.\u00a0 This option works just like the first, -f, option but instead of referencing files, the lists are pasted right onto the cli.<\/p>\n<p>As mentioned, all options display all output to standard out which of course means that you can monitor the action live, write it to a file or use the pipe to run other shell commands (<a title=\"grep - Wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Grep\">grep<\/a> is one obvious example) and better parse the data.<\/p>\n<hr \/>\n<p>Here&#8217;s the text for push.ksh, just copy and paste it (<a href=\"https:\/\/creativecommons.org\/publicdomain\/zero\/1.0\/\">CC0<\/a>)!<\/p>\n<pre>#!\/bin\/ksh\r\n\r\n#########################################################################\r\n# WHO - Chris Grundemann                                                #\r\n# WAT - push.ksh\t                                                #\r\n# WEN - 02-APR-08 \/\/ Last Edit: 15-May-08 (CLG)                         #\r\n# WER - TWTC IP NOC\t\t                                        #\r\n# WHY - This script will push configs out to Juniper routers using\t#\r\n#     - pre-written or generated set commands \t\t\t\t#\r\n#########################################################################\r\n\r\nhelp () {\r\nprint '\r\n   Chris wrote this script for personal use.\r\n   If it messes something up that is your fault for\r\n   using it in the first place.  By using this script\r\n   you agree to this and further agree to kick your\r\n   own @$$ for messing things up with a script.\r\n\r\nUsage: push.sh -f  \r\n       push.sh -d \r\n       push.sh -p [you then paste the list of routers and list of set commands into the cli]\r\n'\r\n}\r\n\r\nrundir() {\r\n# This section is utilized when the config must be individualized for\r\n# each router.  Generate your set commands and save them in files that\r\n# are named with the hostname (or IP) of the router in question.\r\n\r\nfor rtr in `ls -1 $RTRDIR`\r\n do\r\n\techo \"configure exclusive\" &gt; $HOME\/temp.cmd\r\n\tcat $RTRDIR\/$rtr &gt;&gt; $HOME\/temp.cmd\r\n\techo \"show | compare\" &gt;&gt; $HOME\/temp.cmd\r\n\techo \"commit synchronize and-quit\" &gt;&gt; $HOME\/temp.cmd\r\n\t\/usr\/local\/bin\/jlogin -f $HOME\/.cloginrc -x $HOME\/temp.cmd $rtr\r\ndone\r\n}\r\n\r\nrunfile() {\r\n# This section is utilized when the config change is the same for a\r\n# group of routers.  Save your set commands in one file and a list\r\n# of hostnames or IPs to act on in another.\r\n\r\nrm -f $HOME\/temp.cmd\r\n\r\nfor rtr in `cat $RTRLST` \r\n do\r\n\techo \"configure exclusive\" &gt; $HOME\/temp.cmd\r\n\tcat $CMD &gt;&gt; $HOME\/temp.cmd\r\n\techo \"show | compare\" &gt;&gt; $HOME\/temp.cmd\r\n\techo \"commit check\" &gt;&gt; $HOME\/temp.cmd\r\n\techo \"commit synchronize and-quit\" &gt;&gt; $HOME\/temp.cmd\r\n\t\/usr\/local\/bin\/jlogin -f $HOME\/.cloginrc -x $HOME\/temp.cmd $rtr\r\ndone\r\n\r\nrm -f $HOME\/temp.cmd\r\n}\r\n\r\nrunpaste() {\r\n# This section is utilized when the config change is the same for a\r\n# group of routers.  With this option there is no need to create any\r\n# files ahead of time though, you can simply paste the two lists\r\n# onto the command line.  You must have paste_input.pl for this to\r\n# work.\r\n\r\nrm -f paste.cmd\r\nrm -f paste.rtr\r\nPASTE=\/home\/storage\/scripts\/noc\/paste_input.pl\r\n\r\nprint '\r\n\r\nPaste the list of routers to act on:'\r\n$PASTE paste.rtr\r\n\r\nprint '\r\n\r\nPaste the set commands to execute on all routers above:'\r\n$PASTE paste.cmd\r\n\r\nfor rtr in `cat paste.rtr`\r\n do\r\n        echo \"configure exclusive\" &gt; $HOME\/temp.cmd\r\n        cat paste.cmd &gt;&gt; $HOME\/temp.cmd\r\n        echo \"show | compare\" &gt;&gt; $HOME\/temp.cmd\r\n        echo \"commit check\" &gt;&gt; $HOME\/temp.cmd\r\n        echo \"commit synchronize and-quit\" &gt;&gt; $HOME\/temp.cmd\r\n        \/usr\/local\/bin\/jlogin -f $HOME\/.cloginrc -x $HOME\/temp.cmd $rtr\r\ndone\r\n\r\nrm -f paste.cmd\r\nrm -f paste.rtr\r\n}\r\n\r\nwhile [ \"$1\" ]; do\r\n# Here we find out how the user wants to use this tool and\r\n# collect the needed variables.\r\n\tcase \"$1\" in\r\n\t\t-d)\r\n\t\t\tRTRDIR=$2\r\n\t\t\trundir\r\n\t\t\texit 0\r\n\t\t;;\r\n\t\t-f)\r\n\t\t\tRTRLST=$2\r\n\t\t\tCMD=$3\r\n\t\t\trunfile\r\n\t\t\texit 0\r\n\t\t;;\r\n\t\t-p)\r\n\t\t\trunpaste\r\n\t\t\texit 0\r\n\t\t;;\r\n\t\t*)\r\n\t\t\thelp\r\n\t\t\texit 0\r\n\t\t;;\r\n\tesac\r\nshift\r\ndone\r\n\r\n#######\r\n# END #\r\n#######<\/pre>\n<hr \/>\n<p>And here&#8217;s the text for paste_input.pl, which is called by push.ksh (<a href=\"https:\/\/creativecommons.org\/publicdomain\/zero\/1.0\/\">CC0<\/a>):<\/p>\n<pre>#!\/usr\/bin\/perl\r\n\r\nmy($save_file);\r\n$save_file = $ARGV[0];\r\nopen (MYFILE, \"&gt;$save_file\");\r\n\r\nprint \"  (ctrl-d on a free line when you are done)\\n\";\r\n\r\nwhile($line=) {\r\n\tchomp($line);\r\n\tprint MYFILE \"$line\\n\";\r\n        }\r\n\r\nclose (MYFILE);<\/pre>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>I hope this can be of use to you; if it is &#8211; please drop me a comment or an email and let me know.\u00a0 Thanks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote push.ksh to &#8220;push&#8221; commands out to several Juniper\/JUNOS routers at once.  Push.ksh can be used to do many repetitive tasks across a given group of routers &#8211; including configuration changes.<\/p>\n","protected":false},"author":1,"featured_media":2653,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":""},"categories":[14,16],"tags":[402,412,473,616,630],"class_list":["post-355","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-juniper","category-network-tools","tag-juniper","tag-korn","tag-network-tools","tag-script","tag-shell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>push.ksh - A Tool for Large Juniper Networks ~ Chris Grundemann<\/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:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"push.ksh - A Tool for Large Juniper Networks ~ Chris Grundemann\" \/>\n<meta property=\"og:description\" content=\"I wrote push.ksh to &quot;push&quot; commands out to several Juniper\/JUNOS routers at once. Push.ksh can be used to do many repetitive tasks across a given group of routers - including configuration changes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\" \/>\n<meta property=\"og:site_name\" content=\"Chris Grundemann\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/chris.grundemann\" \/>\n<meta property=\"article:published_time\" content=\"2009-04-07T22:57:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-22T14:01:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"1366\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"~Chris\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/ChrisGrundemann\" \/>\n<meta name=\"twitter:site\" content=\"@ChrisGrundemann\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"~Chris\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\"},\"author\":{\"name\":\"~Chris\",\"@id\":\"https:\/\/chrisgrundemann.com\/#\/schema\/person\/16a6af2797267c7d91f29876d5a0870f\"},\"headline\":\"push.ksh &#8211; A Tool for Large Juniper Networks\",\"datePublished\":\"2009-04-07T22:57:09+00:00\",\"dateModified\":\"2015-05-22T14:01:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\"},\"wordCount\":776,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\/\/chrisgrundemann.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg\",\"keywords\":[\"Juniper\",\"Korn\",\"Network Tools\",\"Script\",\"Shell\"],\"articleSection\":[\"Juniper\",\"Network Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\",\"url\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\",\"name\":\"push.ksh - A Tool for Large Juniper Networks ~ Chris Grundemann\",\"isPartOf\":{\"@id\":\"https:\/\/chrisgrundemann.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg\",\"datePublished\":\"2009-04-07T22:57:09+00:00\",\"dateModified\":\"2015-05-22T14:01:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage\",\"url\":\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg\",\"contentUrl\":\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg\",\"width\":2048,\"height\":1366,\"caption\":\"hello world\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/chrisgrundemann.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Juniper\",\"item\":\"https:\/\/chrisgrundemann.com\/index.php\/category\/juniper\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"push.ksh &#8211; A Tool for Large Juniper Networks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/chrisgrundemann.com\/#website\",\"url\":\"https:\/\/chrisgrundemann.com\/\",\"name\":\"Chris Grundemann\",\"description\":\"Use technology, marketing, and strategy to take your growing business to the next level.\",\"publisher\":{\"@id\":\"https:\/\/chrisgrundemann.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/chrisgrundemann.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/chrisgrundemann.com\/#organization\",\"name\":\"Grundemann Technology Solutions\",\"url\":\"https:\/\/chrisgrundemann.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/chrisgrundemann.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2020\/10\/cropped-GTS-Logo.png\",\"contentUrl\":\"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2020\/10\/cropped-GTS-Logo.png\",\"width\":512,\"height\":512,\"caption\":\"Grundemann Technology Solutions\"},\"image\":{\"@id\":\"https:\/\/chrisgrundemann.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ChrisGrundemann\",\"https:\/\/www.linkedin.com\/company\/grundemann\",\"https:\/\/www.linkedin.com\/in\/cgrundemann\/\",\"https:\/\/www.youtube.com\/channel\/UCJ3Pk4AAVMBG4KCzxYAtExA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/chrisgrundemann.com\/#\/schema\/person\/16a6af2797267c7d91f29876d5a0870f\",\"name\":\"~Chris\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/cbff57968626714c5bdb525f740f898c0d1e506a63c350b6a3341e57337e7fc7?s=96&d=mm&r=pg\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cbff57968626714c5bdb525f740f898c0d1e506a63c350b6a3341e57337e7fc7?s=96&d=mm&r=pg\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cbff57968626714c5bdb525f740f898c0d1e506a63c350b6a3341e57337e7fc7?s=96&d=mm&r=pg\",\"caption\":\"~Chris\"},\"description\":\"Creative|Technologist. Curious. Boisterous. Autotelic Autodidact. Heretic. Hacker. Rider of Boards. Writer of Words. ...Traveler of Time...\",\"sameAs\":[\"https:\/\/chrisgrundemann.com\",\"https:\/\/www.facebook.com\/chris.grundemann\",\"http:\/\/instagram.com\/chrisgrundemann\",\"www.linkedin.com\/in\/cgrundemann\",\"https:\/\/x.com\/https:\/\/twitter.com\/ChrisGrundemann\",\"https:\/\/www.youtube.com\/channel\/UCJ3Pk4AAVMBG4KCzxYAtExA\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"push.ksh - A Tool for Large Juniper Networks ~ Chris Grundemann","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:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/","og_locale":"en_US","og_type":"article","og_title":"push.ksh - A Tool for Large Juniper Networks ~ Chris Grundemann","og_description":"I wrote push.ksh to \"push\" commands out to several Juniper\/JUNOS routers at once. Push.ksh can be used to do many repetitive tasks across a given group of routers - including configuration changes.","og_url":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/","og_site_name":"Chris Grundemann","article_author":"https:\/\/www.facebook.com\/chris.grundemann","article_published_time":"2009-04-07T22:57:09+00:00","article_modified_time":"2015-05-22T14:01:54+00:00","og_image":[{"width":2048,"height":1366,"url":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg","type":"image\/jpeg"}],"author":"~Chris","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/ChrisGrundemann","twitter_site":"@ChrisGrundemann","twitter_misc":{"Written by":"~Chris","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#article","isPartOf":{"@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/"},"author":{"name":"~Chris","@id":"https:\/\/chrisgrundemann.com\/#\/schema\/person\/16a6af2797267c7d91f29876d5a0870f"},"headline":"push.ksh &#8211; A Tool for Large Juniper Networks","datePublished":"2009-04-07T22:57:09+00:00","dateModified":"2015-05-22T14:01:54+00:00","mainEntityOfPage":{"@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/"},"wordCount":776,"commentCount":8,"publisher":{"@id":"https:\/\/chrisgrundemann.com\/#organization"},"image":{"@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage"},"thumbnailUrl":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg","keywords":["Juniper","Korn","Network Tools","Script","Shell"],"articleSection":["Juniper","Network Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/","url":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/","name":"push.ksh - A Tool for Large Juniper Networks ~ Chris Grundemann","isPartOf":{"@id":"https:\/\/chrisgrundemann.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage"},"image":{"@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage"},"thumbnailUrl":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg","datePublished":"2009-04-07T22:57:09+00:00","dateModified":"2015-05-22T14:01:54+00:00","breadcrumb":{"@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#primaryimage","url":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg","contentUrl":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg","width":2048,"height":1366,"caption":"hello world"},{"@type":"BreadcrumbList","@id":"https:\/\/chrisgrundemann.com\/index.php\/2009\/push-ksh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/chrisgrundemann.com\/"},{"@type":"ListItem","position":2,"name":"Juniper","item":"https:\/\/chrisgrundemann.com\/index.php\/category\/juniper\/"},{"@type":"ListItem","position":3,"name":"push.ksh &#8211; A Tool for Large Juniper Networks"}]},{"@type":"WebSite","@id":"https:\/\/chrisgrundemann.com\/#website","url":"https:\/\/chrisgrundemann.com\/","name":"Chris Grundemann","description":"Use technology, marketing, and strategy to take your growing business to the next level.","publisher":{"@id":"https:\/\/chrisgrundemann.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/chrisgrundemann.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/chrisgrundemann.com\/#organization","name":"Grundemann Technology Solutions","url":"https:\/\/chrisgrundemann.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/chrisgrundemann.com\/#\/schema\/logo\/image\/","url":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2020\/10\/cropped-GTS-Logo.png","contentUrl":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2020\/10\/cropped-GTS-Logo.png","width":512,"height":512,"caption":"Grundemann Technology Solutions"},"image":{"@id":"https:\/\/chrisgrundemann.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ChrisGrundemann","https:\/\/www.linkedin.com\/company\/grundemann","https:\/\/www.linkedin.com\/in\/cgrundemann\/","https:\/\/www.youtube.com\/channel\/UCJ3Pk4AAVMBG4KCzxYAtExA"]},{"@type":"Person","@id":"https:\/\/chrisgrundemann.com\/#\/schema\/person\/16a6af2797267c7d91f29876d5a0870f","name":"~Chris","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cbff57968626714c5bdb525f740f898c0d1e506a63c350b6a3341e57337e7fc7?s=96&d=mm&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/cbff57968626714c5bdb525f740f898c0d1e506a63c350b6a3341e57337e7fc7?s=96&d=mm&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cbff57968626714c5bdb525f740f898c0d1e506a63c350b6a3341e57337e7fc7?s=96&d=mm&r=pg","caption":"~Chris"},"description":"Creative|Technologist. Curious. Boisterous. Autotelic Autodidact. Heretic. Hacker. Rider of Boards. Writer of Words. ...Traveler of Time...","sameAs":["https:\/\/chrisgrundemann.com","https:\/\/www.facebook.com\/chris.grundemann","http:\/\/instagram.com\/chrisgrundemann","www.linkedin.com\/in\/cgrundemann","https:\/\/x.com\/https:\/\/twitter.com\/ChrisGrundemann","https:\/\/www.youtube.com\/channel\/UCJ3Pk4AAVMBG4KCzxYAtExA"]}]}},"jetpack_featured_media_url":"https:\/\/chrisgrundemann.com\/wp-content\/uploads\/2009\/04\/11272718795_16c04435c0_k.jpg","jetpack_shortlink":"https:\/\/wp.me\/ps8ie-5J","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/posts\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":0,"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/media\/2653"}],"wp:attachment":[{"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chrisgrundemann.com\/index.php\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}