From dae2380e9396ecc50aaec2bc7eac29f03d505037 Mon Sep 17 00:00:00 2001 From: lkxed Date: Sun, 17 Jul 2022 00:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=87=E7=AB=A0=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...220524 The Basic Concepts of Shell Scripting.md | 14 +++++++------- ...220602 Creating a GitHub Action from Scratch.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/tech/20220524 The Basic Concepts of Shell Scripting.md b/sources/tech/20220524 The Basic Concepts of Shell Scripting.md index e3ed827d57..c3c244013e 100644 --- a/sources/tech/20220524 The Basic Concepts of Shell Scripting.md +++ b/sources/tech/20220524 The Basic Concepts of Shell Scripting.md @@ -50,7 +50,7 @@ $man date The redirection operator is really useful when you want to capture the output of a command in a file or redirect to a file. -| - | - | +| Command | Description | | :- | :- | | $ls -l /usr/bin >file | default stdout to file | | $ls -l /usr/bin 2>file | redirects stderr to file | @@ -78,7 +78,7 @@ This creates a directory for 12 months from 2009 to 2011. An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. This variable is a part of the environment in which a process runs. -| - | - | +| Command | Description | | :- | :- | | printenv | Print part of all of the environment | | set | set shell options | @@ -89,7 +89,7 @@ An environment variable is a dynamic-named value that can affect the way running Network commands are very useful for troubleshooting issues on the network and to check the particular port connecting to the client. -| - | - | +| Command | Description | | :- | :- | | ping | Send ICMP packets | | traceroute | Print route packets to a network | @@ -105,7 +105,7 @@ interface stats | Grep commands are useful to find the errors and debug the logs in the system. It is one of the powerful tools that shell has. -| - | - | +| Command | Description | | :- | :- | | grep -h ‘.zip’ file.list | . is any character | | grep -h ‘^zip’ file.list | starts with zip | @@ -118,7 +118,7 @@ Grep commands are useful to find the errors and debug the logs in the system. It Here are some examples of quantifiers: -| - | - | +| Command | Description | | :- | :- | | ? | match element zero or one time | | * | match an element zero or more times | @@ -129,7 +129,7 @@ Here are some examples of quantifiers: Text processing is another important task in the current IT world. Programmers and administrators can use the commands to dice, cut and process texts. -| - | - | +| Command | Description | | :- | :- | | cat -A $FILE | To find any CTRL character introduced | | sort file1.txt file2.txt file3.txt > @@ -151,7 +151,7 @@ by numeric | In Linux, we can go back to our history of commands by either using simple commands or control options. -| - | - | +| Command | Description | | :- | :- | | clear | clears the screen | | history | stores the history | diff --git a/sources/tech/20220602 Creating a GitHub Action from Scratch.md b/sources/tech/20220602 Creating a GitHub Action from Scratch.md index 550971f29d..66530640b2 100644 --- a/sources/tech/20220602 Creating a GitHub Action from Scratch.md +++ b/sources/tech/20220602 Creating a GitHub Action from Scratch.md @@ -69,7 +69,7 @@ An action has essentially two components (Figure 4). One is a YAML file called a Let us look at what exactly these two components do. -The*action.yml* file stores the metadata about the action you are building. It stores details like the name of the action, what are the inputs it needs and the outputs it delivers. It also defines whether the source code of the action is in JavaScript that can be run using Node12, or is a Docker image. It also contains information about where to find the JavaScript files or the Docker image to run the action. +The *action.yml* file stores the metadata about the action you are building. It stores details like the name of the action, what are the inputs it needs and the outputs it delivers. It also defines whether the source code of the action is in JavaScript that can be run using Node12, or is a Docker image. It also contains information about where to find the JavaScript files or the Docker image to run the action. The source code part of your action contains the actual logic of it. This can be JavaScript files that can run using Node12, a Dockerfile that you are going to build when an action runs, or it can simply be a Docker image that you refer to. It will have access to the event payload that triggered the workflow and also the context of the workflow run through environment variables (ENV). You can easily call GitHub’s APIs or other APIs from within your source code as a part of your logic, to accomplish the action’s task.