{"id":61,"date":"2008-02-09T03:00:17","date_gmt":"2008-02-08T19:00:17","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/store-a-file-output-in-a-variable\/"},"modified":"2012-02-11T18:47:28","modified_gmt":"2012-02-11T10:47:28","slug":"store-a-file-output-in-a-variable","status":"publish","type":"post","link":"https:\/\/www.sysadmindayph.com\/blog\/store-a-file-output-in-a-variable\/","title":{"rendered":"Store a file output in a variable"},"content":{"rendered":"<p> <em>draft&#8230;&#8230;. note to self<br \/>\n<\/em><br \/>\n<script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"ca-pub-8839128323193448\";\n\/* sysadmin-bigsquare *\/\ngoogle_ad_slot = \"0154488356\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n\/\/-->\n<\/script><br \/>\n<script type=\"text\/javascript\"\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/p>\n<p>#!\/bin\/bash -x<br \/>\nFILE=&#8221;\/tmp\/IAP_sched&#8221;<br \/>\nDIR=&#8221;\/PRA\/prod\/files\/nz\/area11\/logs\/&#8221;<br \/>\nFILE2=$(awk &#8216;{ print $1 }&#8217; $FILE)<br \/>\necho &#8220;*** Nameserver IP ***&#8221;<br \/>\nfor ip in $FILE2<br \/>\ndo<br \/>\necho &#8220;Doing GTL on&#8221; $ip<br \/>\n\/PRA\/prod\/scripts\/arc\/get_log_times  *$ip* &gt;&gt; \/tmp\/output.txt<br \/>\ndone<br \/>\n<script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"ca-pub-8839128323193448\";\n\/* sysadmin-bigsquare *\/\ngoogle_ad_slot = \"0154488356\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n\/\/-->\n<\/script><br \/>\n<script type=\"text\/javascript\"\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><br \/>\n*alias command is not recognize.. hence the full path of &#8216;glt&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>draft&#8230;&#8230;. note to self #!\/bin\/bash -x FILE=&#8221;\/tmp\/IAP_sched&#8221; DIR=&#8221;\/PRA\/prod\/files\/nz\/area11\/logs\/&#8221; FILE2=$(awk &#8216;{ print $1 }&#8217; $FILE) echo &#8220;*** Nameserver IP ***&#8221; for ip in $FILE2 do echo &#8220;Doing GTL on&#8221; $ip \/PRA\/prod\/scripts\/arc\/get_log_times *$ip* &gt;&gt; \/tmp\/output.txt done *alias &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,1],"tags":[],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-scripting","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":1,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":305,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions\/305"}],"wp:attachment":[{"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}