Using shell scripts, we can edit and adjust our commands without having to rewrite them. Writing a Shell Scriptįinally, the best technique for running multi-line shell code is scripting. Will the variable e print? It was nested inside a Here tag, inside a sub shell.Ī nested backslash statement within a subshell, within curly braces.īash: line 11: cd: txt: No such file or directoryĮven though the directory txt is non-existent, this statement will still print since the previous command was separated with a semicolon ( ). Since the variable d was declared in a subshell will it display outside the subshell? Let's see: Let’s see the output from these commands: 35Īn example of using the backslash within curly braces as a nested multi-line code. > this statement will still print since the previous command \ > echo -e "\nEven though the directory txt is non-existent, \ > within a subshell, within curly braces." > echo -e "\nA nested backslash statement \ > echo "Greater still, the opportunities." > ThingsHeard.txt
0 Comments
Leave a Reply. |