Shell scripting
In the previous section, you were able to gain an understanding of how Crosh can be used to execute individual commands at the command line. However, one of the truly powerful features of any command-line language is the ability to take those individual commands and link them together into scripts. Scripts provide two important benefits to administrators; they allow logic to be introduced into the command line and they open the door to automation.
Due to its limited command set and the targeted nature of the Crosh commands, shell scripting can’t be natively performed. However, as you’ve previously experienced, Crosh can be used as a pass-through to access the Linux command line hidden underneath. However, to leverage this feature, you’ll need to make a few modifications to your system. Performing the following steps will prepare the way for you to do shell scripting on ChromeOS:
- On your Chrome device’s keyboard, press and hold...