Moment For Technology

Remember a pit caused by too intelligent production tools

Background Recently, I am making a CLI tool for Proto file processing. Before using Proto file, it is generally divided into two ways: Directly referencing proto files, dynamically generating JS code at runtime, generating corresponding JS files through the protoc tool, and referencing the latter in the project will have higher performance, because the compilation process is before the program is run, so the latter is generally used to use. Because it is a universal tool, so proto text...

The difference between the three quotation marks in the shell

There are single, double, and back quotes in the shell, and each of them is used differently. } Single-quoted strings: Any character in a single quote will be printed as it is. Variables in a single quote string are invalid. A single quote cannot appear in a single quote string (even if you use an escape character for a single quote). Double quotes {code... } double quotation marks can contain variables inside double quotation marks...

xxxxx.sh line 13: if[ == N]: command not found

Sh line 13: if[== N]: If Else Command not found If Else Command not found If Else Command not found If Else Command not found View this answer and this answer example {code... } space is required between if and [space is required before and after]...

Commands are common in shell scripts

We need to learn to use tools to free hands, such as batch to folder some files to create soft links, we can write a script to achieve. Here are some of the commands used in this project. When a variable is defined, the variable name does not have the dollar sign {code... } uses a variable that has been defined by prefixing the variable name with a dollar sign {code... } The curly braces around the variable name are optional, with or without the curly braces added to help solve...

Shell script snippets

1, traverse the date within the given time range {code... }

Liunx shell script learning collation

Shell script is a program written in C language. When a shell program is executed, the logic code of C language will be executed at the bottom. The shell is a command-line language as well as a programming language.

Mysql > backup from MySQL

This document describes how to install and use the MySQL backup tool. 2.1 Function: Backup MySQL database every day. Mysql > mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh = mysqlbak.sh The backup result file is zxindb1.sql, export all tables, stored procedures, functions, events, and tablespaces for all databases...

Shell cheat

1: Ctrl + A: Move to First of Command Line Ctrl + E: Move to End of Command Line Ctrl + U: Remove from Cursor to First of Command Line 2: Special Variable $? -> The exit status of the previous command or the return value of the function {code... } exit status is an integer value prior to 0 -- 255, which is returned to the shell by the command at the end of the command

Bash: String

One exception is \newline (backslash + newline), which is treated as a long string newline and is printed with \newline (backslash + newline) removed and ignored.

Search
About
mo4tech.com (Moment For Technology) is a global community with thousands techies from across the global hang out!Passionate technologists, be it gadget freaks, tech enthusiasts, coders, technopreneurs, or CIOs, you would find them all here.