O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shell Scripting with JavaScript

Video Description

In this Shell Scripting with JavaScript training course, expert author Wes Higbee will teach you how to use Node.js to automate common tasks. This course is designed for users that are already familiar with JavaScript.

You will start by learning how to connect shell concepts, then jump into learning about ShellJS, including thumbnail conversion, prompting for input, and portability and LWIP on Windows. From there, Wes will teach you about options with commander, functional pipelines, and reusing scripts. Finally, this video tutorial will teach you how to test shell scripts, including how to set up Mocha and test weekly averages.

Once you have completed this computer based training course, you will be fully capable of using Node.js to write shell scripts to automate common tasks. Working files are included, allowing you to follow along with the author throughout the lessons.

Table of Contents

  1. A First JS Shell Script
    1. Is This Course For Me 00:05:03
    2. About The Author 00:00:58
    3. Shell Scripting Mac, Linux, Unix With BASH 00:05:56
    4. Shell Scripting Windows 00:05:35
    5. Why NodeJs 00:04:20
    6. NodeJs Versions And Mac Tooling 00:05:14
    7. Windows Tooling 00:02:18
    8. The NodeJs REPL As A Shell 00:02:39
    9. Benefit - NPM Ecosystem Of Packages 00:06:07
    10. Benefit - Object Oriented 00:03:24
    11. Benefit - Cross Platform Consistency 00:01:18
  2. Connecting Shell Concepts
    1. A First JS Script 00:03:42
    2. NodeJs Globals 00:03:40
    3. Environment Variables 00:03:06
    4. Writing To Files 00:04:56
    5. STDOUT/STDERR 00:03:59
    6. Exit Codes 00:03:03
    7. MyPyramid Food Raw Data Example 00:03:21
    8. The Path Module 00:07:01
    9. Using ~ In Paths 00:03:20
    10. Reading A File 00:01:24
    11. Piping Output 00:01:19
    12. Pretty Print XML 00:03:43
    13. Arguments 00:03:46
    14. Challenge - Word Count 00:01:13
  3. ShellJS
    1. ShellJS 00:03:40
    2. ls) And echo() 00:04:20
    3. rm() And mkdir() 00:04:55
    4. Thumbnail Conversion Part - 1 00:06:04
    5. Thumbnail Conversion Part - 2 00:02:07
    6. exec() 00:01:46
    7. find() And filter() 00:03:12
    8. exit() 00:00:47
    9. cat() And to() 00:01:39
    10. env 00:00:27
    11. Prompting For Input 00:03:51
    12. Portability And lwIP On Windows 00:04:41
    13. Resources 00:01:34
  4. Options With Commander
    1. Commander 00:05:38
    2. Arguments With Commander 00:04:00
    3. Automatic Help 00:00:45
    4. Required Arguments 00:01:11
    5. Argument Defaults 00:01:24
    6. Splitting Out An Options Module 00:03:30
    7. Challenge 00:01:48
  5. Functional Pipelines
    1. Back To CSVs 00:01:06
    2. Average Closing Price 00:04:37
    3. Functional Sum 00:06:12
    4. Separation Of Concerns 00:02:46
    5. Sorting Prices 00:02:29
    6. Average Price By Week 00:06:08
  6. Reusing Scripts
    1. Running The Script Anywhere 00:02:01
    2. Setting Up A Global NPM Package 00:05:51
    3. Global Packages On A Mac 00:02:37
    4. Global Packages On Windows 00:04:18
    5. Updating Our Package 00:01:29
    6. Publishing The Script 00:03:24
  7. Testing Shell Scripts
    1. The Desire To Test 00:01:46
    2. Setting Up Mocha 00:04:13
    3. Testing Weekly Averages Part - 1 00:03:51
    4. Testing Weekly Averages Part - 2 00:04:14
    5. Course Conclusion And Resources 00:05:07