2018-08-25-meeting_bash_scripting
Differences
This shows you the differences between two versions of the page.
| 2018-08-25-meeting_bash_scripting [2026/06/10 20:50] – created steve | 2018-08-25-meeting_bash_scripting [2026/06/10 20:56] (current) – steve | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Meeting (Bash Scripting) ==== | ==== Meeting (Bash Scripting) ==== | ||
| ** Steve Jones 2018-08-26**\\ | ** Steve Jones 2018-08-26**\\ | ||
| + | I ran this script as a presentation for this meeting - it's about bash, in bash, named Bashy. | ||
| + | |||
| + | You can download it by clicking on the name at the top of the code window below. | ||
| <code bash Bashy> | <code bash Bashy> | ||
| #!/bin/bash -i | #!/bin/bash -i | ||
| Line 8: | Line 11: | ||
| # | # | ||
| # | # | ||
| - | # Steve Jones, for the 2008-04-26 | + | # Steve Jones, for the 2008-04-26 |
| # Updates and information will be made available as quickly | # Updates and information will be made available as quickly | ||
| # as time permits. | # as time permits. | ||
| # Set the values for $LINES and $COLUMNS | # Set the values for $LINES and $COLUMNS | ||
| - | eval `resize` # This runs a sub-shell, the output of which | + | eval $(resize) # This runs a sub-shell, the output of which |
| # is evaluated by the current shell. | # is evaluated by the current shell. | ||
| Line 240: | Line 243: | ||
| CodeOn | CodeOn | ||
| cat <<EOF | Format | cat <<EOF | Format | ||
| - | Users=\`cat << | + | Users=\$(cat << |
| | | ||
| | | ||
| Line 247: | Line 250: | ||
| | | ||
| | | ||
| - | END\` | + | END\) |
| EOF | EOF | ||
| CodeOff | CodeOff | ||
| Line 564: | Line 567: | ||
| Choose descriptive names for variables and functions. | Choose descriptive names for variables and functions. | ||
| - | fl=\`ls -al \$dirname\` # Cryptic. | + | fl=\$(ls -al \$dirname\) # Cryptic. |
| - | file_listing=\`ls -al \$dirname\` # Better. | + | file_listing=\$(ls -al \$dirname\) # Better. |
2018-08-25-meeting_bash_scripting.1781124654.txt.gz · Last modified: by steve
