CSC231 Bash Tutorial 7
--D. Thiebaut (talk) 06:15, 31 March 2017 (EDT)
Contents |
This lab deals with if-statements in bash scripts. If statements in Bash work the same way they work in Python and Java: if somebooleanexpression then dothis else dothat.
|
Reference
- This Bash tutorial heavily uses material presented in the excellent set of pages "Ryan's Tutorials" at http://ryanstutorials.net/bash-scripting-tutorial/. Do not hesitate to study these tutorials if you need additional information.
Backing up your files
Just in case you mess up and erase files in your account by mistake, you will make an archive of all your files and save it in your instructor's account:
cd tar -czvf backup2.tgz * rsubmit backup backup2.tgz
That's it! An archive of all your file should now be saved and available in case of accident!