DemandWhen writing gadgets, you often encounter the need to check things out of MongoDB, because you want to use it in conjunction with other bash toolchain, so the best way to do this is to execute the query on the shell and then pipe it to the
This is the first programming job of the operating system principle course, which complements the functionality of the shell.The main implementation of the basic three types of commands
Executable program Commands
REDIRECT Command
1, #!/bin/shThe first line tells the operating system that the interpreter for this script is/bin/sh this executable file2. While loop:#!/bin/shSleep 1; echo "User"; \Sleep 1; echo "Password"; \While true; Do \echo "Output"Sleep 1; \Done3, the shell
User management is one of the tasks of Linux system maintenance, in which simple actions such as adding and deleting users are designed.Requirements: Add a lot of users at once. In a text file.Format: In the unit of behavior, each line is a user
This script has been used on the production server for more than a year, this script advocates simple aesthetics, only need a script to be able to automatically configure LNMP on any server with network.This script will be used in the script
1. Examples of error methodsAVar=1+1Echo $varThe result of the output is the same, tragedy, hehebVar=1var= $var +1Echo $varOutput is the same, still tragic, hehe2. Correct method1) Use LetVar=1Let "Var+=1"Echo $varThe output is 2, no tragedy this
First, shell overview1.Shell Overview:Shell: Shell, a shell is a command-line interpreter that provides users with an interface-level program that sends requests to the Linux kernel to run programs, and users can start, suspend, stop, or even write
7.1 View a list of the shell programs available in the current Linux system[Email protected] ~]# Cat/etc/shells/bin/sh/bin/bash/sbin/nologin/bin/tcsh/bin/csh/bin/ksh7.2 Confirm some of the linked files that exist in the shell program[Email protected]
This article describes the syntax of the shell, including variables in the shell, conditional judgments, control structures, and functions. In addition, all commands in this article are in variable condition control structure function. The next
Citation: Usually when you write a shell script, you'll find that there are many places that use the same code or the same functionality. If it's a small code, it doesn't matter. But if you use it more than once and it's the same code, I think
From:http://www.nginx.cn/1934.htmlWhere the shell script needs to interact with the here document is the implementation, but some commands require the user to manually go on the interaction such as passwd, SCPIt is very painful to eliminate user
1. about Files and directories-F to determine if an ordinary file exists-D to determine if a directory exists-B Determine if a file is a block device-C Determine if a file is a character device-S to determine if a file is socket (pending correction)-
Once heard a great God told, with purpose to learn, knowledge often can remember prison, remember stability. With the help of mind Map this tool, some of the knowledge points I am interested in classification management. It is convenient for you to
In the shell, arguments can be passed to a function when it is called. Inside the function body, the value of the parameter is obtained in the form of a $n, for example, $ $ for the first argument, and $ = for the second argument ...Examples of
The Bash shell script programming knowledge points are as follows (beginner, incomplete, welcome to the discussion supplement):Shell IntroductionA simple introduction to scriptsVariables and referencesArithmetic operationsInteractive
Linux Shell if parameterUsed in shell programming to determine parameters within an if statement–b return True when file exists and is a block file-C Returns True when file exists and is a character-D returns True when pathname exists and is a
The system environment is: Ubuntu 14.04One, JDK automatic installation scriptJDK automatically installs bash shell scripts, as of today (2014/10/15) Pro-Test available:sudo su #切换到root权限mkdir/usr/local/JAVACD/usr/local/java#download JDK1.7. thewget--
Source: (Linux Shell) Chapter One--Small trial sledgehammer (i.)Starting today, let's study the book "Linux Shell Scripting Raiders".1.1 IntroductionA shell script is usually a text file that starts with #!, as follows:#!/bin/bashThere are two ways
Bash Shell Basic features three (array)One, the array definitionAn array is a contiguous number of independent memory spaces, each of which corresponds to a variable. The bash shell supports only one-dimensional arrays, but there is no limit to the
1. shell script execution Method
There are two ways to execute shell scripts. One is to generate a new shell and then execute the corresponding shell scripts. The other is to execute the shell in the current shell and no longer enable other
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service