Linux Redhat lab: Shell script using Command Substitution

Pubblicato il: 06 July 2023
sul canale di: Le Hoang Long Long
24
0

   • Redhat Lab: Red Hat Certified System Admin...   Link playlist
   • Redhat Lab: Red Hat Certified System Admin...  
2023 07 06 04 12 45

Script04: Using Command Substitution
During the execution of a script, you can use the command substitution
feature of the bash shell and store the output generated by the command into
a variable. For example, the following script called cmd_out.sh will run the
hostname and uname commands and save their outputs in variables. This
script shows two different ways to use command substitution. Make sure to
use the backticks (normally located with the ~ character on the keyboard) to
enclose the uname command.
Add the execute bit and run the script:
The output is self-explanatory.


In questa pagina del sito puoi guardare il video online Linux Redhat lab: Shell script using Command Substitution della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Le Hoang Long Long 06 July 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 24 volte e gli è piaciuto 0 spettatori. Buona visione!