{"id":116457,"date":"2026-02-27T14:53:28","date_gmt":"2026-02-27T14:53:28","guid":{"rendered":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/"},"modified":"2026-02-27T14:54:41","modified_gmt":"2026-02-27T14:54:41","slug":"how-to-make-scripts-you-actually-reuse","status":"publish","type":"post","link":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/","title":{"rendered":"How to make scripts you actually reuse"},"content":{"rendered":"<p> <a href=\"https:\/\/go.fiverr.com\/visit\/?bta=1052423&nci=17043\" Target=\"_Top\"><img loading=\"lazy\" decoding=\"async\" border=\"0\" src=\"https:\/\/fiverr.ck-cdn.com\/tn\/serve\/?cid=40081059\"  width=\"601\" height=\"201\"><\/a>\n<\/p>\n<div>\n<p>Shell scripts are nice, for a lot of causes, however one of the crucial tangible advantages is straightforward: you possibly can cease working the identical prolonged, obscure instructions time and again. You might need a textual content file of instructions you copy and paste, otherwise you would possibly end up on Stack Overflow trying up the identical factor daily.<\/p>\n<p>    <!-- No AdsNinja v10 Client! --><!-- No AdsNinja v10 Client! --><\/p>\n<p>Overcome these dangerous habits, discover ways to script your shell, and reclaim some helpful time.<\/p>\n<p>    <!-- No AdsNinja v10 Client! --><\/p>\n<h2 id=\"get-intimate-with-your-shell\">\n                        Get intimate together with your shell<br \/>\n               <\/h2>\n<p>Should you\u2019re endeavor any severe type of scripting, you\u2019ll must learn about your shell. It\u2019s most likely bash, however it might even be zsh, and even the traditional, authentic shell, sh (the Thompson shell).<\/p>\n<p>You might even have <a href=\"https:\/\/www.howtogeek.com\/669835\/how-to-change-your-default-shell-on-linux-with-chsh\/\" target=\"_blank\">changed your shell<\/a> to one thing else altogether, like sprint or fish. Whichever shell you\u2019re utilizing, it&#8217;s best to learn its handbook and get to know its syntax and capabilities. POSIX shells\u2014like bash, ksh, and zsh\u2014are largely suitable, however every might introduce its personal options on prime.<\/p>\n<p>When you\u2019re exploring, you\u2019ll most likely uncover facets of the shell which are completely new, or that you simply\u2019d heard of, however by no means absolutely understood. This may very well be something from <a href=\"https:\/\/www.howtogeek.com\/ways-the-bashlinux-shell-transforms-your-commands\/\" target=\"_blank\">special characters<\/a> to <a href=\"https:\/\/www.howtogeek.com\/439199\/15-special-characters-you-need-to-know-for-bash\/\" target=\"_blank\">expansion rules<\/a> and <a href=\"https:\/\/www.howtogeek.com\/the-test-patterns-that-real-world-bash-scripts-actually-use\/\" target=\"_blank\">test patterns<\/a>.<\/p>\n<p>    <!-- No AdsNinja v10 Client! --><\/p>\n<h2 id=\"identify-common-tasks\">\n                        Establish frequent duties<br \/>\n               <\/h2>\n<p>This one appears apparent, however deciding what to script would be the greatest consider how a lot time you save doing so. Should you can pace up a process that you simply run daily, that\u2019s a giant win, but when it\u2019s one thing you\u2019ll solely ever do as soon as, it\u2019s not value investing an excessive amount of time in.<\/p>\n<p>The <code>historical past<\/code> command is an efficient means of seeing which different instructions you run most. You may browse it manually or construct somewhat pipeline to get abstract information:<\/p>\n<pre><code class=\"bash\">historical past | sed 's\/^ *[0-9]* *\/\/' | reduce -d' ' -f1 | type | uniq -c | type -n\n<\/code><\/pre>\n<section class=\"emaki-custom-block emaki-custom-tip\" data-nosnippet=\"\">\n<div class=\"emaki-custom tip\" id=\"custom_block_10\">\n<div class=\"custom_block-content tip\">\n<p>Should you\u2019re utilizing zsh, change this command to <code>historical past 0 | ...<\/code>.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<\/section>\n<p>This can fetch the primary phrase of every command you\u2019ve run, rely the cases, and kind them to point out essentially the most frequent final:<\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img  image-expandable  img-article-item\" style=\"padding-bottom:31.2%\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png\" data-modal-id=\"single-image-modal\" data-modal-container-id=\"single-image-modal-container\" data-img-caption=\"&quot;&quot;\">\n                                                                                            <picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=500&amp;dpr=1\"\/><source media=\"(max-width: 767px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=800&amp;dpr=1\"\/><source media=\"(max-width: 1023px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\"\/><img width=\"825\" height=\"257\" loading=\"lazy\" decoding=\"async\" alt=\"A shell command line showing commands from the user\u2019s history and how many times they have run.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2026\/02\/shell-used-commands.png?q=70&amp;fit=crop&amp;w=825&amp;dpr=1\" class=\"img-brightness-opt-out\"\/>\n        <\/picture>\n<\/p><\/div>\n<\/p><\/div>\n<p> This can assist steer you in the appropriate path, and should even let you know how a lot use you\u2019re making of any current scripts you\u2019ve written. Right here\u2019s an identical command that can let you know a bit about which handbook pages you learn essentially the most:<\/p>\n<pre><code class=\"bash\">historical past | sed 's\/^ *[0-9]* *\/\/' | reduce -d' ' -f1- | grep ^man | type | uniq -c | type -n\n<\/code><\/pre>\n<p>For instance, on my system, this tells me I take advantage of man to get assistance on cp, git, strftime, jq, and ls essentially the most. I do know the ls command has many choices, so any scripts I can write that assist encapsulate among the extra obscure ones will most likely be worthwhile.<\/p>\n<p>    <!-- No AdsNinja v10 Client! --><\/p>\n<h2 id=\"use-good-names\">\n                        Use good names<br \/>\n               <\/h2>\n<p>I\u2019ve discovered that one of many greatest boundaries to changing a command or utilizing a brand new program is just remembering it. The <code>ls<\/code> command is seared into my mind and muscle reminiscence, however I discover <code>eza<\/code>, a contemporary different, too obscure to recollect; that identify simply doesn\u2019t say \u201crecord recordsdata\u201d to me.<\/p>\n<p>There are methods to take care of this for third-party applications. You would use an alias, for instance:<\/p>\n<pre><code class=\"bash\">alias record=eza\n<\/code><\/pre>\n<p>This isn\u2019t excellent, although, because it doesn\u2019t rename the person web page or assist different customers, however in your personal functions, it may be a helpful workaround. Nevertheless, there\u2019s no excuse in your personal scripts, so give them good names to start with. Listed below are some suggestions:<\/p>\n<ul>\n<li>\n                                        Shorter names are at all times simpler to work with, offered you possibly can affiliate them with the duty that your script carries out.\n                        <\/li>\n<li>\n                                        Names that leverage current data are handy. The <code>lsd<\/code> program is one other ls different that\u2019s a lot simpler to recollect; it even advantages from tab completion.\n                        <\/li>\n<li>\n                                        However, in case your script has a brief, distinctive prefix, it is going to be simpler to tab full. My system has over 60 instructions that start with \u201cco,\u201d however solely 12 starting with \u201cq\u201d\u2014and a kind of is my very own script!\n                        <\/li>\n<li>\n                                        Scripts ought to at all times be named in lowercase. There\u2019s no higher approach to lose a script than giving it an preliminary capital letter.\n                        <\/li>\n<li>\n                                        Choose instructions with out an extension. Should you save your script as foo.sh, create an alias or symlink named \u201cfoo.\u201d Not solely is that this cleaner, however it\u2019s additionally simpler to vary the extension\u2014in case you rewrite the script in one other language, for instance.\n                        <\/li>\n<\/ul>\n<div class=\"display-card  article article-card small  no-badge  active-content                      \" data-include-community-rating=\"false\" id=\"i-automated-linux-backups-with-a-simple-script-3-lessons-i-learned-the-hard-way\" data-nosnippet=\"\">\n<picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/11\/hand-holding-a-hard-drive-with-cloud-backup-icons-showing-error-alerts-and-an-active-backup-progress-bar.png?q=49&amp;fit=crop&amp;w=140&amp;h=98&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/11\/hand-holding-a-hard-drive-with-cloud-backup-icons-showing-error-alerts-and-an-active-backup-progress-bar.png?q=49&amp;fit=crop&amp;w=140&amp;h=98&amp;dpr=2\"\/><img width=\"440\" height=\"364\" loading=\"lazy\" decoding=\"async\" alt=\"Hand holding a hard drive with cloud backup icons showing error alerts and an active backup progress bar.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/11\/hand-holding-a-hard-drive-with-cloud-backup-icons-showing-error-alerts-and-an-active-backup-progress-bar.png?q=49&amp;fit=crop&amp;w=220&amp;h=182&amp;dpr=2\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/11\/hand-holding-a-hard-drive-with-cloud-backup-icons-showing-error-alerts-and-an-active-backup-progress-bar.png?q=49&amp;fit=crop&amp;w=220&amp;h=182&amp;dpr=2\"\/>\n        <\/picture>\n<p>                    <span data-field=\"label\" class=\"article-card-label\"><label>Associated<\/label><\/span><\/p>\n<div class=\"w-display-card-content regular article-block\">\n<h5 class=\"display-card-title \">\n<p>\t\t<a href=\"https:\/\/www.howtogeek.com\/i-automated-linux-backups-with-a-simple-script-3-lessons-i-learned-the-hard-way\/\" title=\"I automated Linux backups with a simple bash script and cron (and it\u2019s better than a GUI)\" target=\"_blank\"><br \/>\n\t\t\tI automated Linux backups with a simple bash script and cron (and it\u2019s better than a GUI)<br \/>\n\t\t<\/a><br \/>\n\t<\/h5>\n<p class=\"display-card-excerpt\">Skip one-click backup apps. This rsync script offers you full management over what will get saved and when, plus logs and some hard-won classes.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No AdsNinja v10 Client! --><\/p>\n<h2 id=\"keep-them-in-a-sensible-place\">\n                        Maintain them in a wise place<br \/>\n               <\/h2>\n<p>You may put your scripts anyplace you want, however to run them conveniently, you\u2019ll need them in a listing <a href=\"https:\/\/www.howtogeek.com\/658904\/how-to-add-a-directory-to-your-path-in-linux\/\" target=\"_blank\">that\u2019s named in your PATH variable<\/a>.<\/p>\n<p>Should you\u2019re writing scripts for a number of customers to run on one system, it&#8217;s best to put them in <code>\/usr\/native\/bin<\/code>. This follows <a href=\"https:\/\/www.howtogeek.com\/117435\/htg-explains-the-linux-directory-structure-explained\/\" target=\"_blank\">the standard Linux directory structure<\/a>.<\/p>\n<p>Your private scripts belong inside your house listing, not a world listing like \/bin or \/usr\/bin. The standard location was ~\/bin, which you&#8217;ll must create. Should you don\u2019t like seeing too many directories in your house, you should use a hidden one as an alternative: ~\/.bin.<\/p>\n<p>The most recent conference is to comply with the <a href=\"https:\/\/www.howtogeek.com\/the-hidden-files-in-your-linux-home-directory-explained\/\" target=\"_blank\">XDG spec and use a folder like ~\/.local\/bin<\/a>. You might have already got this listing, even in case you\u2019re unaware of it, with third-party software program inside.<\/p>\n<div class=\"display-card  article article-card small  no-badge  active-content                      \" data-include-community-rating=\"false\" id=\"this-ide-actually-made-me-better-programmer\" data-nosnippet=\"\">\n<picture><source media=\"(max-width: 480px)\" data-srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/05\/some-ides-side-by-side-with-question-marks-around-them.png?q=49&amp;fit=crop&amp;w=140&amp;h=98&amp;dpr=2\" srcset=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/05\/some-ides-side-by-side-with-question-marks-around-them.png?q=49&amp;fit=crop&amp;w=140&amp;h=98&amp;dpr=2\"\/><img width=\"440\" height=\"364\" loading=\"lazy\" decoding=\"async\" alt=\"Some IDEs side by side with question marks around them.\" data-img-url=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/05\/some-ides-side-by-side-with-question-marks-around-them.png?q=49&amp;fit=crop&amp;w=220&amp;h=182&amp;dpr=2\" src=\"https:\/\/static0.howtogeekimages.com\/wordpress\/wp-content\/uploads\/2025\/05\/some-ides-side-by-side-with-question-marks-around-them.png?q=49&amp;fit=crop&amp;w=220&amp;h=182&amp;dpr=2\"\/>\n        <\/picture>\n<p>                    <span data-field=\"label\" class=\"article-card-label\"><label>Associated<\/label><\/span><\/p>\n<div class=\"w-display-card-content regular article-block\">\n<h5 class=\"display-card-title \">\n<p>\t\t<a href=\"https:\/\/www.howtogeek.com\/this-ide-actually-made-me-better-programmer\/\" title=\"This IDE Actually Made Me a Better Programmer\" target=\"_blank\"><br \/>\n\t\t\tThis IDE Actually Made Me a Better Programmer<br \/>\n\t\t<\/a><br \/>\n\t<\/h5>\n<p class=\"display-card-excerpt\">One IDE to rule all of them. You will not need to use the rest.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No AdsNinja v10 Client! --><\/p>\n<h2 id=\"use-functions-for-more-maintainable-code\">\n                        Use features for extra maintainable code<br \/>\n               <\/h2>\n<p>When your scripts turn out to be longer than a sure dimension\u2014usually, past one or two pages\u2014they&#8217;ll turn out to be unwieldy, with repeated code and pointless duplication. Any code you end up repeating is a candidate for transferring right into a operate, lowering the general dimension of your script and making it extra maintainable.<\/p>\n<p>There are two fundamental types of syntax to declare a operate:<\/p>\n<pre><code class=\"bash\">foo() {\n}\n\noperate foo {\n}<\/code><\/pre>\n<p>I like to recommend the primary type, which is a bit shorter and extra broadly suitable. With both type, you\u2019ll have entry to parameters in the identical means your fundamental script does, i.e., utilizing $1 for the primary parameter, $2 for the second, and so forth. You may name a operate in the identical means you\u2019d name any command:<\/p>\n<pre><code class=\"bash\">foo param1 param2<\/code><\/pre>\n<p>One other benefit of writing features is you can reuse them throughout scripts, in addition to inside them. You may import a file containing shell features by sourcing it:<\/p>\n<pre><code class=\"bash\">. .\/shell-functions.sh<\/code><\/pre>\n<p><!-- No AdsNinja v10 Client! --><\/p>\n<p>As with all programming, feedback are a helpful function that it&#8217;s best to neither overuse nor underuse. It\u2019s very important to remark any components of your code which may be obscure at a later date, though such components are ideally stored to a minimal.<\/p>\n<p>In shell scripts, feedback start with a # image. They will happen anyplace on a line and at all times run till the tip of the road:<\/p>\n<p>Feedback could be notably helpful when documenting the parameters {that a} operate expects, since they aren&#8217;t explicitly declared:<\/p>\n<pre><code class=\"bash\"># $1 the publish URL\ntwitter() {\n}<\/code><\/pre>\n<\/div>\n<iframe src=\"https:\/\/www.fiverr.com\/gig_widgets?id=U2FsdGVkX18x7XQvttUTrv1oEqmGNGTgvvCUiUoJ\/AP4z\/UyMz8lXGOLpu15jIMxBbTR0gmD5uBoFvhC4KWeALQRp3h\/X\/AwcVD0K8Wj9H\/ZzYKzcCNHosB9oS4SCJJFWiN85P9ICAc4OgCoE\/wHKIY7CDkf2\/DQ1vqGvk4smVe5cRDEmrLPCWi4FC8p40VUhSmWQ5udCm0zoJtorgWv3vbDQw0kKYkwn39ozAnQXDe+YvWMxkLFWA+O3TFwkJvdkIK+\/AUSnRssPKt5WHY0FhNOxnSPcLslEL4G4\/RfP95ve99U+kRnDy3X+KtzdQLY+u935ghON\/o3UE4IMv9oN6JX9RnxzL\/LRcOgnHigxStSGPKsZYtnz8RWNVT\/rOLAibqiWJadC5MYHRbekF3eg6FOGrQGkXYbsn0+a5aovnlLCbLwIqY9fcS17UX8J235iQ6cdmHNbrPeS84CMm34RA==&affiliate_id=1052423&strip_google_tagmanager=true\" loading=\"lazy\" data-with-title=\"true\" class=\"fiverr_nga_frame\" frameborder=\"0\" height=\"350\" width=\"100%\" referrerpolicy=\"no-referrer-when-downgrade\" data-mode=\"random_gigs\" onload=\" var frame = this; var script = document.createElement('script'); script.addEventListener('load', function() { window.FW_SDK.register(frame); }); script.setAttribute('src', 'https:\/\/www.fiverr.com\/gig_widgets\/sdk'); document.body.appendChild(script); \" ><\/iframe>\n<br \/><a href=\"https:\/\/www.howtogeek.com\/stop-copy-pasting-commands-how-to-make-scripts-you-actually-reuse\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shell scripts are nice, for a lot of causes, however one of the crucial tangible advantages is straightforward: you possibly can cease working the identical&#8230;<\/p>\n","protected":false},"author":1,"featured_media":116458,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-116457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-universe"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to make scripts you actually reuse - mailinvest.blog<\/title>\n<meta name=\"description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to make scripts you actually reuse - mailinvest.blog\" \/>\n<meta property=\"og:description\" content=\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/\" \/>\n<meta property=\"og:site_name\" content=\"mailinvest.blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/freelanceracademic\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-27T14:53:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-27T14:54:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mailinvest.blog\/wp-content\/uploads\/2026\/02\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"900\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin@mailinvest.blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@mailinvest.blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/\"},\"author\":{\"name\":\"admin@mailinvest.blog\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\"},\"headline\":\"How to make scripts you actually reuse\",\"datePublished\":\"2026-02-27T14:53:28+00:00\",\"dateModified\":\"2026-02-27T14:54:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/\"},\"wordCount\":1225,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png\",\"articleSection\":[\"Tech Universe\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/\",\"name\":\"How to make scripts you actually reuse - mailinvest.blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png\",\"datePublished\":\"2026-02-27T14:53:28+00:00\",\"dateModified\":\"2026-02-27T14:54:41+00:00\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#primaryimage\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png\",\"width\":1600,\"height\":900},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/2026\\\/02\\\/27\\\/how-to-make-scripts-you-actually-reuse\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mailinvest.blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to make scripts you actually reuse\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#website\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"name\":\"mailinvest.blog\",\"description\":\"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.\",\"publisher\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mailinvest.blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#organization\",\"name\":\"mailinvest\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"contentUrl\":\"https:\\\/\\\/mailinvest.blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/default.png\",\"width\":1000,\"height\":1000,\"caption\":\"mailinvest\"},\"image\":{\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/freelanceracademic\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mailinvest.blog\\\/#\\\/schema\\\/person\\\/012701c4c204d4e4ebd34f926cfd31a4\",\"name\":\"admin@mailinvest.blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g\",\"caption\":\"admin@mailinvest.blog\"},\"sameAs\":[\"https:\\\/\\\/mailinvest.blog\",\"admin@mailinvest.blog\"],\"url\":\"https:\\\/\\\/mailinvest.blog\\\/index.php\\\/author\\\/adminmailinvest-blog\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to make scripts you actually reuse - mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","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:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/","og_locale":"en_US","og_type":"article","og_title":"How to make scripts you actually reuse - mailinvest.blog","og_description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","og_url":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/","og_site_name":"mailinvest.blog","article_publisher":"https:\/\/www.facebook.com\/freelanceracademic\/","article_published_time":"2026-02-27T14:53:28+00:00","article_modified_time":"2026-02-27T14:54:41+00:00","og_image":[{"width":1600,"height":900,"url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2026\/02\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png","type":"image\/png"}],"author":"admin@mailinvest.blog","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin@mailinvest.blog","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#article","isPartOf":{"@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/"},"author":{"name":"admin@mailinvest.blog","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4"},"headline":"How to make scripts you actually reuse","datePublished":"2026-02-27T14:53:28+00:00","dateModified":"2026-02-27T14:54:41+00:00","mainEntityOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/"},"wordCount":1225,"commentCount":0,"publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2026\/02\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png","articleSection":["Tech Universe"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/","url":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/","name":"How to make scripts you actually reuse - mailinvest.blog","isPartOf":{"@id":"https:\/\/mailinvest.blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#primaryimage"},"image":{"@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#primaryimage"},"thumbnailUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2026\/02\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png","datePublished":"2026-02-27T14:53:28+00:00","dateModified":"2026-02-27T14:54:41+00:00","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis.mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what's new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","breadcrumb":{"@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#primaryimage","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2026\/02\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2026\/02\/bash-terminal-icon-inside-an-infinity-loop-surrounded-by-parameter-expansion-symbols.png","width":1600,"height":900},{"@type":"BreadcrumbList","@id":"https:\/\/mailinvest.blog\/index.php\/2026\/02\/27\/how-to-make-scripts-you-actually-reuse\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mailinvest.blog\/"},{"@type":"ListItem","position":2,"name":"How to make scripts you actually reuse"}]},{"@type":"WebSite","@id":"https:\/\/mailinvest.blog\/#website","url":"https:\/\/mailinvest.blog\/","name":"mailinvest.blog","description":"Technology is forever changing, and there are always new pieces of technology to replace obsolete ones. Tons of people enjoy reading tech blogs on a daily basis. mailinvest.blog tracks all the latest consumer technology breakthroughs and shows you what&#039;s new, what matters and how technology can enrich your life. mailinvest.blog also provides the information, tools, and advice that helps when deciding what to buy.","publisher":{"@id":"https:\/\/mailinvest.blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mailinvest.blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mailinvest.blog\/#organization","name":"mailinvest","url":"https:\/\/mailinvest.blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/","url":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","contentUrl":"https:\/\/mailinvest.blog\/wp-content\/uploads\/2022\/01\/default.png","width":1000,"height":1000,"caption":"mailinvest"},"image":{"@id":"https:\/\/mailinvest.blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/freelanceracademic\/"]},{"@type":"Person","@id":"https:\/\/mailinvest.blog\/#\/schema\/person\/012701c4c204d4e4ebd34f926cfd31a4","name":"admin@mailinvest.blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/98ed217bd0f3d6a6dcae2d9b0c76e305b049a07275e315e1407e19ec8b08e139?s=96&d=mm&r=g","caption":"admin@mailinvest.blog"},"sameAs":["https:\/\/mailinvest.blog","admin@mailinvest.blog"],"url":"https:\/\/mailinvest.blog\/index.php\/author\/adminmailinvest-blog\/"}]}},"_links":{"self":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/116457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/comments?post=116457"}],"version-history":[{"count":1,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/116457\/revisions"}],"predecessor-version":[{"id":116459,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/posts\/116457\/revisions\/116459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media\/116458"}],"wp:attachment":[{"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/media?parent=116457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/categories?post=116457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mailinvest.blog\/index.php\/wp-json\/wp\/v2\/tags?post=116457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}