{"id":23,"date":"2005-10-24T21:12:50","date_gmt":"2005-10-25T02:12:50","guid":{"rendered":"http:\/\/www.juixe.com\/techknow\/?p=23"},"modified":"2005-10-24T21:12:50","modified_gmt":"2005-10-25T02:12:50","slug":"random-shell-script","status":"publish","type":"post","link":"http:\/\/juixe.com\/techknow\/index.php\/2005\/10\/24\/random-shell-script\/","title":{"rendered":"Random Shell Script"},"content":{"rendered":"<p>Welcome to the random shell script of the week!  This shell script is trivial but useful, especially if you don&#8217;t write this kind of stuff every other day.  The following shell script will iterate over every file in the current directory and print the filename out.<\/p>\n<pre>\n#!\/bin\/sh\n\nfor file in .\/*\ndo\n   echo &quot;$file&quot;\ndone\n<\/pre>\n<p>You can modify the .\/* to .\/*jar to loop through all jar files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the random shell script of the week! This shell script is trivial but useful, especially if you don&#8217;t write this kind of stuff every other day. The following shell script will iterate over every file in the current directory and print the filename out. #!\/bin\/sh for file in .\/* do echo &quot;$file&quot; done [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[3],"tags":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p902K-n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/23"}],"collection":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":0,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}