Table Of Contents:
Overview and goals of this project
This is a WIP learning resource for freebsd's sh(1), this project and page must be written in plain English, as such do not use overly complex grammar in simple solutions. It's goal is to give FreeBSD beginners a comparsion overview for how to write shell scripts and to make them familiar with the shell in general.
== Reasons for beginners to learn sh(1) == The interactive shell is the first interface that shows on your first boot after installing and getting into the bootloader, however it is also where a lot of people spend most of their time toggling and editing the system.
you might accidentally think of FreeBSD configuration files as strings imported only from files, however, when we talk about FreeBSD, almost everything is a file, and as such we tend to learn how to manipulate strings and files in order to understand better the rest of the system.
You can take ~/.profile for example, it is a file that is marked for sh(1) to use. Text in it will be parsed into sh(1) commands and afterwards the interactive shell will appear when things are done. We call it “interactive” because it is awaiting a command.
now you might be confused regarding the “almost everything is a file” bit, this essentially means that your devices, whether it is the Graphical Processing Unit, an SSD, or sound device, are all behaving as files on the filesystem, which is why learning the shell is important, since they will also have a directory, content, etc.
PDF file
I decided to move this resource into a pdf for better layout and formating, as well as not making the page too long.
suggestions
Currently WIP as I am bootstrapping, contributions are welcome and refer to my page for contact, in case of suggestions beyond the scope of the wiki interface.
for the list of the points to be added over time to this guide, contact me. i will update weekly at max.
used resources
FreeBSD man pages; https://man.freebsd.org/cgi/man.cgi?sh(1)