ops102:bash_scripting
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ops102:bash_scripting [2024/03/07 21:36] – chris | ops102:bash_scripting [2024/04/16 18:10] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== NOTE: This page is being edited and is NOT ready for use. ===== | ||
- | |||
====== Bash Scripting ===== | ====== Bash Scripting ===== | ||
Line 176: | Line 174: | ||
===== Command Capture ===== | ===== Command Capture ===== | ||
- | You can capture the output (stdout) of a command as a string using the notation '' | + | You can capture the output (stdout) of a command as a string using the notation '' |
$ echo "The current date and time is: $(date)" | $ echo "The current date and time is: $(date)" | ||
Line 521: | Line 519: | ||
# | # | ||
| | ||
- | COINFLIP=$((RANDOM % 2)) | + | COINFLIP=$((RANDOM % 2)) |
if [[ " | if [[ " | ||
then | then | ||
Line 529: | Line 527: | ||
fi | fi | ||
- | Note that this script uses extended Unicode characters -- however, for these to display properly, your terminal and terminal font must support the extended characters. Besides emoji, extended characters may be used to display accented characters, symbols, and characters from other languages. | + | The COINFLIP variable is set to the remainder of the division of '' |
+ | |||
+ | Note that this script uses extended Unicode characters -- however, for these to display properly, your terminal and your terminal font must both support the extended characters. Besides emoji, extended characters may be used to display accented characters, symbols, and characters from other languages. | ||
=== Cautious File Delete === | === Cautious File Delete === |
ops102/bash_scripting.1709847380.txt.gz · Last modified: 2024/04/16 18:10 (external edit)