{"id":132,"date":"2006-06-25T23:48:00","date_gmt":"2006-06-26T04:48:00","guid":{"rendered":"http:\/\/dragonlordwarlock.com\/blog\/2006\/06\/25\/rexx-script-for-the-day\/"},"modified":"2006-06-25T23:48:00","modified_gmt":"2006-06-26T04:48:00","slug":"rexx-script-for-the-day","status":"publish","type":"post","link":"https:\/\/dragonlordwarlock.com\/blog\/?p=132","title":{"rendered":"Rexx Script for the day"},"content":{"rendered":"<p>I previously wrote a similar rexx program such as this one&#8230; but this one is a little better than my previous one&#8230;. It still has crude error handling so it not meant for the layman to use but someone who knows what they doing. Essentially it does one function, download a number of files that contain some sequence numbering&#8230; 01 02 03 04&#8230;. etc&#8230;.<\/p>\n<p>Anyway here the code&#8230;. It will work on any system that has access to the *nix command wget. Under windows you will need cygwin. Under Linux you will need (obviously) REXX, you can get it from oorexx.org.<\/p>\n<p>#!\/usr\/bin\/rexx<br \/>\/*<br \/>Gogetem<br \/>    Syntax: Gogetem nnn url<br \/>    Automatically starts from 1 using symbol replacement %%n as placeholder<br \/>*\/<br \/>parse arg endvalue urlpath<br \/>if urlpath\\=&#8221;&#8221; then<br \/>do<br \/>    start = 1<br \/>    sz = length(endvalue)<br \/>    do count=start to endvalue<br \/>        r = changestr(&#8216; &#8216;, format(count, sz), &#8216;0&#8217;)<br \/>        s = changestr(&#8216;%%n&#8217;, urlpath, r)<br \/>        &#8216;wget -t 0 -c -T 10 &#8216;s<br \/>    end<br \/>end<br \/>else<br \/>do<br \/>    say &#8220;Syntax incorrect.&#8221;<br \/>    say<br \/>    say &#8220;Syntax gogetem nnn urlpath&#8221;<br \/>    say &#8221;       nnn = largest number in sequence&#8221;<br \/>    say &#8221;       urlpath = url to filter. note that %%n is the placeholder in the path.&#8221;<br \/>end<br \/>exit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I previously wrote a similar rexx program such as this one&#8230; but this one is a little better than my previous one&#8230;. It still has crude error handling so it not meant for the layman to use but someone who knows what they doing. Essentially it does one function, download a number of files that &#8230; <a href=\"https:\/\/dragonlordwarlock.com\/blog\/?p=132\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &#8220;Rexx Script for the day&#8221;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=132"}],"version-history":[{"count":0,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions"}],"wp:attachment":[{"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dragonlordwarlock.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}