{"id":45604,"date":"2024-09-03T22:59:07","date_gmt":"2024-09-03T22:59:07","guid":{"rendered":"https:\/\/goodwriterz.com\/site\/?p=45604"},"modified":"2024-09-03T22:59:07","modified_gmt":"2024-09-03T22:59:07","slug":"15-special-characters-you-need-to-know-for-bash","status":"publish","type":"post","link":"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/","title":{"rendered":"15 Special Characters You Need to Know for Bash"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_68_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >\u062c\u062f\u0648\u0644 \u0627\u0644\u0645\u062d\u062a\u0648\u064a\u0627\u062a<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#What_Are_Special_Characters\" title=\"What Are Special Characters?\">What Are Special Characters?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Home_Directory\" title=\"~ Home Directory\">~ Home Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Current_Directory\" title=\". Current Directory\">. Current Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Parent_Directory\" title=\".. Parent Directory\">.. Parent Directory<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Path_Directory_Separator\" title=\"\/ Path Directory Separator\">\/ Path Directory Separator<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Single_Character_Bash_Wildcard\" title=\"? Single Character Bash Wildcard\">? Single Character Bash Wildcard<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Character_Sequence_Bash_Wildcard\" title=\"* Character Sequence Bash Wildcard\">* Character Sequence Bash Wildcard<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Character_Set_Wildcard\" title=\"() Character Set Wildcard\">() Character Set Wildcard<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Shell_Command_Separator\" title=\"; Shell Command Separator\">; Shell Command Separator<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Background_Process\" title=\"&amp; Background Process\">&amp; Background Process<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#%3C_Input_Redirection\" title=\"&lt; Input Redirection\">&lt; Input Redirection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#%3E_Output_Redirection\" title=\"&gt; Output Redirection\">&gt; Output Redirection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Pipe\" title=\"| Pipe\">| Pipe<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Pipeline_logical_NOT_and_History_Operator\" title=\"! Pipeline logical NOT and History Operator\">! Pipeline logical NOT and History Operator<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#_Variable_Expressions\" title=\"$ Variable Expressions\">$ Variable Expressions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/#Quoting_Special_Characters\" title=\"Quoting Special Characters\">Quoting Special Characters<\/a><\/li><\/ul><\/nav><\/div>\n<div>\n<p> If you want to master the Bash shell on Linux, macOS, or another UNIX-like system, special characters (like ~, *, |, and &gt;) are critical. We&#8217;ll help you unravel these cryptic Linux command sequences and become a hero of hieroglyphics. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":0,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":0,\"nbrPlacementsScanned\":0,\"ruleCount\":200,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":243} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":0,\"ruleCount\":200,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":200,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><br \/>\n<!-- No winning ad found for zone: below first paragraph! --><br \/>\n<!-- No winning ad found for zone: native in content! --><\/p>\n<h2 id=\"what-are-special-characters\"><span class=\"ez-toc-section\" id=\"What_Are_Special_Characters\"><\/span> What Are Special Characters? <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> There are a set of characters the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/man7.org\/linux\/man-pages\/man1\/bash.1.html\">Bash shell<\/a> treats in two different ways. When you type them at the shell, they act as instructions or commands and tell the shell to perform a certain function. Think of them as single-character commands. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":240} --><\/p>\n<p> Sometimes, you just want to print a character and don&#8217;t need it to act as a magic symbol. There&#8217;s a way you can use a character to represent itself rather than its special function. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":431} --><\/p>\n<p> We&#8217;ll show you which characters are &#8220;special&#8221; or &#8220;meta-&#8221; characters, as well as how you can use them functionally and literally. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":585} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":585} --><\/p>\n<h2 id=\"home-directory\"><span class=\"ez-toc-section\" id=\"_Home_Directory\"><\/span> ~ Home Directory <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> The tilde (~) is shorthand for your home directory. It means you don&#8217;t have to type the full path to your home directory in commands. Wherever you are in the filesystem, you can use this command to go to your home directory: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":815} --><\/p>\n<pre>cd ~<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":821} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":821,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":79,\"nextBlockCount\":240,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1061} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":1,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":1,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":1,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":161} --><\/p>\n<p> You can also use this command with relative paths. For example, if you&#8217;re somewhere in the file system that&#8217;s not under your home folder and want to change to the <code>archive<\/code> directory in your <code>work<\/code> directory, use the tilde to do it: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":399} --><\/p>\n<pre>cd ~\/work\/archive<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":418} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":658} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":658} --><\/p>\n<h2 id=\"current-directory\"><span class=\"ez-toc-section\" id=\"_Current_Directory\"><\/span> . Current Directory <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> A period (.) represents the current directory. You see it in directory listings if you use the <code>-a<\/code> (all) option with <code>ls<\/code>. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":779} --><\/p>\n<pre>ls -a<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":786} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":786,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":114,\"nextBlockCount\":240,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1026} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":2,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":2,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":2,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"212\" loading=\"lazy\" alt=\"ls -a in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C212&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":126} --><\/p>\n<p> You can also use the period in commands to represent the path to your current directory. For example, if you want to run a script from the current directory, you would call it like this: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":314} --><\/p>\n<pre>.\/script.sh<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":327} --><\/p>\n<p> This tells Bash to look in the current directory for the <code>script.sh<\/code> file. This way, it won&#8217;t search the directories in your path for matching executable or script. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":495} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\".\/script.sh in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_390_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_390_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":735} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":735} --><\/p>\n<h2 id=\"parent-directory\"><span class=\"ez-toc-section\" id=\"_Parent_Directory\"><\/span> .. Parent Directory <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> The double period or &#8220;double dot&#8221; (..) represents the parent directory of your current one. You can use this to move up one level in the directory tree. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":899} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":899,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":1,\"nextBlockCount\":7,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":906} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":3,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":3,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":3,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<pre>cd ..<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":6} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd .. in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_580_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_580_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":246} --><\/p>\n<p> You can also use this command with relative paths&#8212;for example, if you want to go up one level in the directory tree, and then enter another directory at that level. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":414} --><\/p>\n<p> You can also use this technique to move quickly to a directory at the same level in the directory tree as your current one. You hop up one level, and then back down one into a different directory. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":612} --><\/p>\n<pre>cd ..\/gc_help<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":627} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ..\/gc_help in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_890_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_890_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":867} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":867} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":867,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":33,\"nextBlockCount\":106,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":973} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":4,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":4,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":4,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<h2 id=\"path-directory-separator\"><span class=\"ez-toc-section\" id=\"_Path_Directory_Separator\"><\/span> \/ Path Directory Separator <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> You can use a forward-slash (\/)&#8212;often just called a slash&#8212;to separate the directories in a pathname. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":73} --><\/p>\n<pre>ls ~\/work\/archive<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":92} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"197\" loading=\"lazy\" alt=\"ls ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_174_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_174_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C197&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":332} --><\/p>\n<p> One forward-slash represents the shortest possible directory path. Because everything in the Linux directory tree starts at the root directory, you can use this command to move to the root directory quickly: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":541} --><\/p>\n<pre>cd \/<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":547} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd \/ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_558_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_558_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":787} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":787} --><\/p>\n<p> Most often, you use the hash or number sign (#) to tell the shell what follows is a comment, and it should not act on it. You can use it in shell scripts and&#8212;less usefully&#8212;on the command line. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":5,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":5,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":985} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":5,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<pre># This will be ignored by the Bash shell<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":42} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"# This will be ignored by the Bash shell na terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_633_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404344_633_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":282} --><\/p>\n<p> It isn&#8217;t truly ignored, however, because it&#8217;s added to your command history. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":368} --><\/p>\n<p> You can also use the hash to trim a string variable and remove some text from the beginning. This command creates a string variable called <code>this_string<\/code>. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":521} --><\/p>\n<p> In this example, we assign the text &#8220;Dave Geek!&#8221; to the variable. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":598} --><\/p>\n<pre>this_string=\"Dave Geek!\"<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":634} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":874} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":874,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":26,\"nextBlockCount\":296,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1170} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":6,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":6,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":6,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> This command uses <code>echo<\/code> to print the words &#8220;How-To&#8221; to the terminal window. It retrieves the value stored in the string variable via a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/man7.org\/linux\/man-pages\/man1\/bash.1.html#EXPANSION\">parameter expansion<\/a>. Because we append the hash and the text &#8220;Dave,&#8221; it trims off that portion of the string before it&#8217;s passed to <code>echo<\/code>. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":270} --><\/p>\n<pre>echo How-To ${this_string#Dave}<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":303} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":543} --><\/p>\n<p> This doesn&#8217;t change the value stored in the string variable; it only affects what&#8217;s sent to <code>echo<\/code>. We can use <code>echo<\/code> to print the value of the string variable once more and check this: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":734} --><\/p>\n<pre>echo $this_string<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":753} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":7,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":7,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":993} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":7,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":0} --><\/p>\n<h2 id=\"single-character-bash-wildcard\"><span class=\"ez-toc-section\" id=\"_Single_Character_Bash_Wildcard\"><\/span> ? Single Character Bash Wildcard <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> Bash shell supports three wildcards, one of which is the question mark (?). You use wildcards to replace characters in filename templates. A filename that contains a wildcard forms a template that matches a range of filenames, rather than just one. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":250} --><\/p>\n<p> The question mark wildcard represents exactly one character. Consider the following filename template: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":354} --><\/p>\n<pre>ls badge?.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":369} --><\/p>\n<p> This translates as &#8220;list any file with a name that starts with &#8216;badge&#8217; and is followed by any single character before the filename extension.&#8221; <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":531} --><\/p>\n<p> It matches the following files. Note that some have numbers and some have letters after the &#8220;badge&#8221; portion of the filename. The question mark wildcard will match both letters and numbers. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":731} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":8,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":8,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":971} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":8,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> That filename template doesn&#8217;t match &#8220;badge.txt,&#8221; though, because the filename doesn&#8217;t have a single character between &#8220;badge&#8221; and the file extension. The question mark wildcard must match a corresponding character in the filename. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":261} --><\/p>\n<p> You can also use the question mark to find all files with a specific number of characters in the filenames. This lists all text files that contain exactly five characters in the filename: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":450} --><\/p>\n<pre>ls ?????.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":464} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":704} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":704} --><\/p>\n<h2 id=\"character-sequence-bash-wildcard\"><span class=\"ez-toc-section\" id=\"_Character_Sequence_Bash_Wildcard\"><\/span> * Character Sequence Bash Wildcard <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> You can use the asterisk (*) wildcard to stand for any sequence of characters, including no characters. Consider the following filename template: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":851} --><\/p>\n<pre>ls badge*<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":862} --><\/p>\n<p> This matches all of the following: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":898} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":898,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":2,\"nextBlockCount\":240,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1138} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":9,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":9,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":9,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":238} --><\/p>\n<p> It matches &#8220;badge.txt&#8221; because the wildcard represents any sequence of characters or no characters. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":349} --><\/p>\n<p> This command matches all files called &#8220;source,&#8221; regardless of the file extension. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":442} --><\/p>\n<pre>ls source.*<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":455} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":695} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":695} --><\/p>\n<h2 id=\"character-set-wildcard\"><span class=\"ez-toc-section\" id=\"_Character_Set_Wildcard\"><\/span> () Character Set Wildcard <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> As covered above, you use the question mark to represent any single character and the asterisk to represent any sequence of characters (including no characters). <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":858} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":858,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":42,\"nextBlockCount\":207,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1065} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":10,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":10,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":10,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> You can form a wildcard with the square brackets ( () ) and the characters they contain. The relevant character in the filename must then match at least one of the characters in the wildcard character set. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":165} --><\/p>\n<p> In this example, the command translates to: &#8220;any file with a &#8220;.png&#8221; extension, a filename beginning with &#8220;pipes_0,&#8221; and in which the next character is either 2, 4, or 6.&#8221; <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":367} --><\/p>\n<pre>ls badge_0(246).txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":388} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":628} --><\/p>\n<p> You can use more than one set of brackets per filename template: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":694} --><\/p>\n<pre>ls badge_(01)(789).txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":718} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":11,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":11,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":958} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":11,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> You can also include ranges in the character set. The following command selects files with the numbers 21 to 25, and 31 to 35 in the filename. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":144} --><\/p>\n<pre>ls badge_(23)(1-5).txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":168} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~ in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":408} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":408} --><\/p>\n<h2 id=\"shell-command-separator\"><span class=\"ez-toc-section\" id=\"_Shell_Command_Separator\"><\/span> ; Shell Command Separator <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> You can type as many commands as you like on the command line, as long as you separate each of them with a semicolon (;). We&#8217;ll do this in the following example: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":575} --><\/p>\n<pre>ls &gt; count.txt; wc -l count.txt; rm count.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":625} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":865} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":865,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":35,\"nextBlockCount\":112,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":977} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":12,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":12,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":12,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Note that the second command runs even if the first fails, the third runs even if the second fails, and so on. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":77} --><\/p>\n<p> If you want to stop the sequence of execution if one command fails, use a double ampersand (&amp;&amp;) instead of a semicolon: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":206} --><\/p>\n<pre>cd .\/doesntexist &amp;&amp; cp ~\/Documents\/reports\/* .<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":262} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":502} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":502} --><\/p>\n<h2 id=\"amp-background-process\"><span class=\"ez-toc-section\" id=\"_Background_Process\"><\/span> &amp; Background Process <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> After you type a command in a terminal window and it completes, you return to the command prompt. Normally, this only takes a moment or two. But if you launch another application, such as <code>gedit<\/code>, you cannot use your terminal window until you close the application. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":767} --><\/p>\n<p> You can, however, launch an application as a background process and continue to use the terminal window. To do this, just add an ampersand to the command line: <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":13,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":13,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":928} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":13,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<pre>gedit command_address.page &amp;<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":34} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":274} --><\/p>\n<p> Bash shows you the process ID of what launched, and then returns you to the command line. You can then continue to use your terminal window. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":416} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":416} --><\/p>\n<h2 id=\"lt-input-redirection\"><span class=\"ez-toc-section\" id=\"%3C_Input_Redirection\"><\/span> &lt; Input Redirection <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> Many Linux commands accept a file as a parameter and take their data from that file. Most of these commands can also take input from a stream. To create a stream, you use the left-angle bracket ( &lt; ), as shown in the following example, to redirect a file into a command: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":691} --><\/p>\n<pre>sort &lt; words.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":712} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":14,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":14,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":952} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":14,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> When a command has input redirected into it, it might behave differently than when it reads from a named file. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":112} --><\/p>\n<p> If we use <code>wc<\/code> to count the words, lines, and characters in a file, it prints the values, and then the filename. If we redirect the contents of the file to <code>wc<\/code>, it prints the same numeric values but doesn&#8217;t know the name of the file from which the data came. It cannot print a filename. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":401} --><\/p>\n<p> Here are some examples of how you can use <code>wc<\/code>: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":448} --><\/p>\n<pre>wc words.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":462} --><\/p>\n<pre>wc &lt; words.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":481} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":721} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":721} --><\/p>\n<h2 id=\"gt-output-redirection\"><span class=\"ez-toc-section\" id=\"%3E_Output_Redirection\"><\/span> &gt; Output Redirection <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> You can use the right-angle bracket ( &gt; ) to redirect the output from a command (typically, into a file); here&#8217;s an example: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":854} --><\/p>\n<pre>ls &gt; files.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":873} --><\/p>\n<pre>cat files.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":888} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":888,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":12,\"nextBlockCount\":240,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1128} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":15,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":15,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":15,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":228} --><\/p>\n<p> Output redirection can also redirect error messages if you use a digit (2, in our example) with <code>&gt;<\/code>. Here&#8217;s how to do it: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":356} --><\/p>\n<pre>wc doesntexist.txt 2&gt; errors.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":393} --><\/p>\n<pre>cat errors.txt<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":409} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":649} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":649} --><\/p>\n<h2 id=\"pipe\"><span class=\"ez-toc-section\" id=\"_Pipe\"><\/span> | Pipe <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> A &#8220;pipe&#8221; chains commands together. It takes the output from one command and feeds it to the next as input. The number of piped commands (the length of the chain) is arbitrary. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":836} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":836,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":64,\"nextBlockCount\":293,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1129} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":16,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":16,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":16,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> Here, we&#8217;ll use <code>cat<\/code> to feed the contents of the words.txt file into <code>grep<\/code>, which extracts any line that contains either a lower- or uppercase &#8220;C.&#8221; <code>grep<\/code> will then pass these lines to <code>sort<\/code>. <code>sort<\/code> is using the <code>-r<\/code> (reverse) option, so the sorted results will appear in reverse order. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":229} --><\/p>\n<p> We typed the following: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":254} --><\/p>\n<pre>cat words.txt | grep (cC) | sort -r<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":291} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":531} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":531} --><\/p>\n<h2 id=\"pipeline-logical-not-and-history-operator\"><span class=\"ez-toc-section\" id=\"_Pipeline_logical_NOT_and_History_Operator\"><\/span> ! Pipeline logical NOT and History Operator <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> The exclamation point (!) is a logical operator that means NOT. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":596} --><\/p>\n<p> There are two commands in this command line: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":642} --><\/p>\n<pre>( ! -d .\/backup ) &amp;&amp; mkdir .\/backup<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":687} --><\/p>\n<ul>\n<li> The first command is the text within the square brackets; <\/li>\n<li> The second command is the text that follows the double ampersands <code>&amp;&amp;<\/code>. <\/li>\n<\/ul>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":826} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":826,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":74,\"nextBlockCount\":227,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1053} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":17,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":17,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":17,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> The first command uses <code>!<\/code> as a logical operator. The square brackets indicate a test is going to be made. The <code>-d<\/code> (directory) option tests for the presence of a directory called backup. The second command creates the directory. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":153} --><\/p>\n<p> Because double ampersands separate the two commands, Bash will only execute the second if the first succeeds. However, that&#8217;s the opposite of what we need. If the test for the &#8220;backup&#8221; directory succeeds, we don&#8217;t need to create it. And if the test for the &#8220;backup &#8220;directory fails, the second command won&#8217;t be executed, and the missing directory won&#8217;t be created. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":555} --><\/p>\n<p> This is where the logical operator <code>!<\/code> comes in. It acts as a logical NOT. So, if the test succeeds (i.e., the directory exists), the <code>!<\/code> flips that to &#8220;NOT success,&#8221; which is failure. So, the second command <em>isn&#8217;t<\/em> activated. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":791} --><\/p>\n<p> If the directory test fails (i.e., the directory doesn&#8217;t exist), the <code>!<\/code> changes the response to &#8220;NOT failure,&#8221; which is success. So, the command to create the missing directory is executed. <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":18,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":18,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":995} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":18,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> That little <code>!<\/code> packs a lot of punch when you need it to! <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":57} --><\/p>\n<p> To check the status of the backup folder, you use the <code>ls<\/code> command and the <code>-l<\/code> (long listing) and <code>-d<\/code> (directory) options, as shown below: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":193} --><\/p>\n<pre>ls -l -d backup<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":210} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":450} --><\/p>\n<p> You can also run commands from your command history with the exclamation point. The <code>history<\/code> command lists your command history, and you then type the number of the command you wish to re-run with <code>!<\/code> to execute it, as shown below: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":680} --><\/p>\n<pre>!24<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":685} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"77\" loading=\"lazy\" alt=\"cd ~\/work\/archive in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404342_669_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C77&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":19,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":19,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":925} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":19,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<p> The following re-runs the previous command: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":45} --><\/p>\n<pre>!!<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":49} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":49} --><\/p>\n<h2 id=\"variable-expressions\"><span class=\"ez-toc-section\" id=\"_Variable_Expressions\"><\/span> $ Variable Expressions <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> In the Bash shell, you create variables to hold values. Some, like <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/man7.org\/linux\/man-pages\/man7\/environ.7.html\">environment variables,<\/a> always exist, and you can access them any time you open a terminal window. These hold values, such as your username, home directory, and path. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":283} --><\/p>\n<p> You can use <code>echo<\/code> to see the value a variable holds&#8212;just precede the variable name with the dollar sign ($), as shown below: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":410} --><\/p>\n<pre>echo $USER<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":422} --><\/p>\n<pre>echo $HOME<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":434} --><\/p>\n<pre>echo $PATH<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":446} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"212\" loading=\"lazy\" alt=\"ls -a in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C212&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":686} --><\/p>\n<p> To create a variable, you must give it a name and provide a value for it to hold. You do not have to use the dollar sign to create a variable. You only add <code>$<\/code> when you reference a variable, such as in the following example: <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":20,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":20,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":910} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":20,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<pre>ThisDistro=Ubuntu<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":19} --><\/p>\n<pre>MyNumber=2001<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":34} --><\/p>\n<pre>echo $ThisDistro<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":52} --><\/p>\n<pre>echo $MyNumber<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":68} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"212\" loading=\"lazy\" alt=\"ls -a in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C212&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":308} --><\/p>\n<p> Add braces ( {} ) around the dollar sign and perform a parameter expansion to obtain the value of the variable and allow further transformations of the value. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":468} --><\/p>\n<p> This creates a variable that holds a string of characters, as shown below: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":544} --><\/p>\n<pre>MyString=123456qwerty<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":567} --><\/p>\n<p> Use the following command to echo the string to the terminal window: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":637} --><\/p>\n<pre>echo ${MyString}<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":655} --><\/p>\n<p> To return the substring starting at position 6 of the whole string, use the following command (there&#8217;s a zero-offset, so the first position is zero): <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":810} --><\/p>\n<pre>echo ${myString:6}<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":830} --><\/p>\n<p> If you want to echo a substring that starts at position zero and contains the next six characters, use the following command: <\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":21,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":21,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":957} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":21,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":false,\"actualCount\":0} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":false,\"currentRuleCount\":900,\"actualCount\":0,\"hasActualCountMetThreshold\":null,\"countRemainingForInjection\":null,\"nextBlockCount\":null,\"hasCountRemainingForInjectionMetThreshold\":null} --><\/p>\n<pre>echo ${myString:0:6}<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":22} --><\/p>\n<p> Use the following command to echo a substring that starts at position four and contains the next four characters: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":137} --><\/p>\n<pre>echo ${myString:4:4}<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":159} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"212\" loading=\"lazy\" alt=\"ls -a in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C212&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":399} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":399} --><\/p>\n<h2 id=\"quoting-special-characters\"><span class=\"ez-toc-section\" id=\"Quoting_Special_Characters\"><\/span> Quoting Special Characters <span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p> If you want to use a special character as a literal (non-special) character, you have to tell the Bash shell. This is called quoting, and there are three ways to do it. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":569} --><\/p>\n<p> If you enclose the text in quotation marks (&#8220;&#8230;&#8221;), this prevents Bash from acting on most of the special characters, and they just print. One notable exception, though, is the dollar sign ($). It still functions as the character for variable expressions, so you can include the values from variables in your output. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":897} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":897,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":3,\"nextBlockCount\":53,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":950} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":22,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":22,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":22,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p> For example, this command prints the date and time: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":50} --><\/p>\n<pre>echo \"Today is $(date)\"<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":85} --><\/p>\n<p> If you enclose the text in single quotes (&#8216;&#8230;&#8217;) as shown below, it stops the function of all the special characters: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":212} --><\/p>\n<pre>echo 'Today is $(date)'<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":245} --><\/p>\n<p> You can use a backslash ( \\ ) to prevent the following character from functioning as a special character. This is called &#8220;escaping&#8221; the character; see the example below: <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":426} --><\/p>\n<pre>echo \"Today is \\$(date)\"<\/pre>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":462} --><\/p>\n<div class=\"body-img landscape \">\n<div class=\"responsive-img image-expandable img-article-item\">\n<figure><img data-recalc-dims=\"1\" decoding=\"async\" width=\"646\" height=\"212\" loading=\"lazy\" alt=\"ls -a in a terminal window\" data-img-url=\"https:\/\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png\" src=\"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/1725404343_141_15-Special-Characters-You-Need-to-Know-for-Bash.png?resize=646%2C212&#038;ssl=1\" style=\"height:auto;max-width:100%\" title=\"\">  <\/figure>\n<\/p><\/div>\n<\/p><\/div>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":702} --><\/p>\n<p> Just think of special characters as very short commands. If you memorize their uses, it can benefit your understanding of the Bash shell&#8212;and other people&#8217;s scripts&#8212;immensely. <\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":886} --><br \/>\n<!-- Repeatable debug data: {\"isEarlyInjection\":true,\"currentRuleCount\":900,\"actualCount\":886,\"hasActualCountMetThreshold\":true,\"countRemainingForInjection\":14,\"nextBlockCount\":320,\"hasCountRemainingForInjectionMetThreshold\":true,\"nextCount\":1206} --><\/p>\n<p><!-- Repeatable debug data: {\"injection\":\"before\",\"adPosition\":23,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":23,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":900} --><!-- Zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"after\",\"adPosition\":24,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":24,\"nbrPlacementsScanned\":23,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"isEarlyInjection\":true,\"actualCount\":0} --><\/p>\n<p><!-- No repeatable ad for zone: character count repeatable. --><!-- Repeatable debug data: {\"injection\":\"none\",\"adPosition\":24,\"startingPoint\":0,\"skipEvery\":null,\"nbrPlacementFilledEachSkip\":24,\"nbrPlacementsScanned\":24,\"ruleCount\":900,\"degradationStartingPoint\":1,\"stopAds\":null,\"actualCount\":306} --><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you want to master the Bash shell on Linux, macOS, or another UNIX-like system, special characters (like ~, *, |, and &gt;) are critical. We&#8217;ll help you unravel these cryptic Linux command sequences and become a hero of hieroglyphics. What Are Special Characters? There are a set of characters the Bash shell treats in &#8230; <a title=\"15 Special Characters You Need to Know for Bash\" class=\"read-more\" href=\"https:\/\/goodwriterz.com\/site\/15-special-characters-you-need-to-know-for-bash\/\" aria-label=\"Read more about 15 Special Characters You Need to Know for Bash\">\u0625\u0642\u0631\u0623 \u0627\u0644\u0645\u0632\u064a\u062f<\/a><\/p>\n","protected":false},"author":1,"featured_media":45605,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6],"tags":[42,43],"class_list":["post-45604","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-linux-macos-terminal"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/goodwriterz.com\/site\/wp-content\/uploads\/2024\/09\/15-Special-Characters-You-Need-to-Know-for-Bash.jpg?fit=1920%2C1080&ssl=1","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/posts\/45604","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/comments?post=45604"}],"version-history":[{"count":0,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/posts\/45604\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/media\/45605"}],"wp:attachment":[{"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/media?parent=45604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/categories?post=45604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/goodwriterz.com\/site\/wp-json\/wp\/v2\/tags?post=45604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}