13th Chapter Landing EnvironmentWhen logging into the system, enter the user name and password, and if the authentication passes, enter the login environment.Logon processFile/etc/passwd$HOME. ProfileCustom $HOME. profile/etc/passwd file parsing
With Crontab you can execute a shell script or a series of Linux commands at a specified time. For example, the system administrator schedules a backup task to run every dayHow do I add a job to cron?# crontab–e0 5 * * */root/bin/backup.shThis will
One#!/bin/bash#自动添加用户, and make the initial password a user account name, and force the user to change the password when they log onI=1While [$i-le 15]DoIf [$i-le 9]ThenUseradd user0$iecho "User0$i" | passwd--stdin user0$i &>/dev/nullchage-d 0 user0$
After you install Lync2013 on Windows R2, the Lync Management Shell does not open properly, such as:650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/41/5A/wKioL1PTfSrS4XniAAC4xFArUeA489.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiol1
Shell is a program for managing and running processes. Next we will simulate a shell program. This instance will better understand the process creation and termination in Linux/Unix systems, and the relationship between parent and child processes.
Recently, I started to get started with some shell commands because of compiling some files. It seems amazing and the usage is quite large. So I made some notes and the command sequence may be messy, the function is not fully functional. 1. Cut
I am also a beginner in liunx. If there is any error, please point it out. Liunx: Ubuntu 14.04
I. liunx command Basics
Press CTRL + ALT + T to open the terminal in Ubuntu.
Basic liunx Command Format: Command [-options] parameter1 parameter2
1. The
The simplest form of shell scripts is to list a series of commands. Shell acts as an interpreter and runs them one by one until the last or exits. However, this can only be a simple task. It is only the time when the province and province have to
Reprinted: http://blog.chinaunix.net/u/22677/showart_1076318.html
1. IntroductionSed is a non-interactive editor. It does not modify the file unless you use shell redirection to save the results. By default, all output rows are printed to the screen.
Before the introduction, I first thought about a question: Sometimes we fail to enter the user's shell environment after switching the user through the su command. Why?
Login Shell:Complete logon process is required when Bash is obtained. That is to
Sort command
Sort [Option] [input file]
Option:
-C: Check whether the file has been sorted. If not, output the first unsorted record.
-K specifies the sorting domain
-M merges two sorted files, and the merged files are also sorted, such as sort-M A1
Target
Implement recording of shell execution start time, end time, running status, error information, etc. Use the function to encapsulate log records and use scripts to call functions.Source code universal function script
How does Shell obtain parameters?
When writing a shell script, you often need to obtain parameters from the outside, for example:
$ sh demo.sh a
So how can we upload the above parameter A to the shell program.$0 $1... $10, where $0 is the name of
Shell script variables are processed as strings rather than numbers by default, which makes it complicated to perform mathematical operations in shell scripts. Perl and python will be a better choice to maintain Script Programming specifications and
Each language has its own string operation method, and the shell is the same. The following describes common methods in an example.
1. Get the string length
String = abc12342341 // do not have spaces on the second side of the equal sign echo $ {#
Note: Here are the shell notes I made. Next, we will provide a series of notes.
Shell is a scripting language, so there must be an interpreter to execute these scripts. Common shell script interpreters in Unix/Linux include bash, sh, CSH, and KSh.
As mentioned above, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings. Such variables are called special variables.
For example, $ indicates the ID of the
Shell Learning & amp; and | what is the difference?Before answering the questions in this chapter, let's first understand the concept of return value!Each command or function we run in shell will return a value of the parent itinerary at the
Learning bash notes-debugging shell programs
In shell, the simplest debugging assistant outputs the echo statement. Many echo statements can be put into the code for debugging, but it takes enough time to locate
The information to view. You may need
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.