By defaultShellis not timed out automatically, but it is sometimes necessary for it to automatically exit the terminal after a period of inactivity without an operation. 1. Create a file /etc/profile.d/autologout.sh :#
First, regular expressionBefore learning the Find command, we have been exposed to some simple regular, so we can now learn some complex regularization. First of all, we still have to review what is regular expression, see this tutorial first, must
Pipe character and job controlPipe break: The result of the preceding command is passed to the following command by the pipe character.Example
[Email protected] ~]# cat/etc/passwd|wc-l43
Job Control: When you run a process, you can use
Shell IntroductionThe shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the command entered by the user and feeds it into the kernel to execute.There is a layer of things
Shell Scriptdking~ sharing1.1 Scripting ConceptsPut multiple commands into a single file to facilitate one-time execution of a program fileUnified Script Storage Directory:/server/scriptsUsing Vim to edit scripts is recommendedTo view the script
This article describes the underlying file operations: Create, move, edit, delete files and foldersCommand and Case:mkdir Creating a Directory--Create two directories[Email protected]:~$ mkdir test2 test3--Create a new directory under Test1
Reprinted from Http://www.cnblogs.com/liyuhui-Z/p/7792108.htmlShell IntroductionAs a command language, the shell interprets and executes user-entered commands interactively, and as a programming language, it defines variables and parameters and
1211shell
High wavesArchive: Learning NotesDecember 11, 2017 13:10:56
Shortcut keys:Ctrl + 1 title 1Ctrl + 2 title 2Ctrl + 3 title 3Ctrl + 4 ExampleCtrl + 5 Program CodeCtrl + 6 Body
Format Description:Blue
Shell Pass ParametersWe can pass parameters to the script when executing the Shell script, and the format of the parameters obtained in the script is:$n. n represents a number, 1 is the first argument to execute the script, 2 is the second argument
1. How shell scripts runCreate shell script files, usually ending with. SH (e.g. example.sh)The shell script works as follows:
Add ' x ' Execute permissions (relative or absolute path execution)
To invoke a script file using the bash or
First, the script formatVim shell.sh#!/bin/bash//Declaration script interpreter, this ' # ' is not a comment, the rest is a comment#Program://program Content description#History://Time and authorIi. Types of Shell variablesUser-defined variables:
Shell Script Programming Syntax:Note:Article source http://www.cnblogs.com/yunquan/p/6821850.htmlVideo Source: https://www.bilibili.com/video/av10565321/index_1.html?t=684Each statement here must have a space control, or syntax error 1. file format以.
8.6 Pipe break and job control:1, cat 1.txt |wc-l; Cat 1.txt |grep ' aaa '2. Ctrl Z pauses a task3. Jobs View background tasks4, Bg[id] The task to the backstage5. Fg[id] Transfer the task to the front desk6. Add & Drop the command back to the
Parentheses ():1. The commands in parentheses will be executed in a new sub-shell order, so the variables in parentheses cannot be used by the rest of the script. Multiple commands in parentheses are separated by semicolons, and the last command can
1. The relationship between Vim,vi and exVim does not need to install, VI for ex "Visual Mode", Vim is the advanced version of VI;2. Unix Shell shortcut keysctrl+a/e position the cursor to the head/tail of the commandctrl+u/k ctrl+y Paste ctrl+u/k
Requirements: A total of more than 300 machines, write a script to automatically clean up these two types of machine log files. In the Fortress machine batch release, also want to batch publish to crontab inside.Class A machine log storage path is
Wrote a shell script on the Liunx, want to call this shell script through Java, do not know how to call, in the Internet said to use process this way, but my executive machine and my shell script is not the same computer, the boss said Java can
Statistical analysis of log files in the number of accesses per IP and sorted from high to low?Download the file to a local suffix#!/bin/bashawk? ' {print?$1} '? ip.log?|? Sort?|? Uniq?-c?|? Sort?-rn?|? MoreSh-x uniqip.sh?+ awk ' {print $} ' Ip.log+
The cause of the bad interpreter:no such file or directory is an issue with the document format. This file was written under Windows. Line wrapping is not the same as UNIX, but under vim if it is not set a bit and it is completely invisible.Problem
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