Linux--shell Programming variable assignment and reference
Linux shell programming is a very mature programming language that supports various types of variables. There are three main types of variables: environment variables, internal variables,
Both exec and source belong to the Bash Internal command (builtins commands), which is entered under bash for man exec or
Man source can view all the internal command information.
The bash shell commands fall into two categories: external commands
Login vs. Non-logon Shell:
Distinction: Whether you need to enter a username password.
Transformation:
Non-login can be converted to login using--login
Consider the conversion situation, the relatively scientific distinction: neither the password,
What is a shell script.
Shell scripting (English: Shell script) is a computer program and text file that consists of a series of shell commands that operate after the Unix shell literal translation of its contents. Designed as a scripting language,
This article directory:1.1 Document Descriptor (file DESCRIPTION,FD)1.2 Copying of file descriptors1.3 Redirect Order is important: ">file 2>&1" and "2>&1 >file"1.4 Changing the redirect target for the current shell environment1.5 Closing file
A Shell introduction: 1 descriptionThe shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.A Shell is an application that provides an interface through which users
Compile-language:The program needs a special compilation process before execution, which compiles the program into a machine language file, the runtime does not need to be re-translated, the results of the direct use of the compilation is OK. The
Debugging Methods for Shell scripts
-N: Read the command in the script but not execute it to check for syntax errors in the script
-V: Executes scripts while printing executed script commands to standard error output
-X: Provides
Special symbols for Liunx
Represents a number of letters or numbers? Any one character"#" Comment\ de-Semantic characters| Pipe character
1.* represents any arbitrary character or number[[email protected]/]# ls *.txt1.txt[Email
The most likely cause of this problem is:Files written under Windows are uploaded to Linux execution.I wrote the code on notepad++, and then uploaded it to Linux to execute it and report this error. Careful examination, there is no grammatical error.
If condition judgment and if True and false judgment
Directory:1. Correct wording2. Wrong wording3. Summary
First, the correct wordingWhen writing shell scripts, to simplify the line numbers and structure of the code, it is common to
Interview and actual combat exam questions: monitoring the Web Site Directory (/var/html/www) All files have been maliciously tampered with (the contents of the file has been changed), The scheduled task executes every 3 minutes if there is a file
Shell scripts fall into three categories: logon scripts, interactive scripts, non-interactive scriptsOneThe logon script is similar to the logon script in the computer settings under Windows and the collection of logon scripts under Account settings
I. Functions in the shell[Email protected] aming]# cd/root/shell/aming[Email protected] aming]# vim fun1.sh//need to be aware that function names cannot conflict with some keywords in the shell#!/bin/bashfunction InP () {Echo $ $ $ $#}INP 1 a
Reference book "VC + + Windows Shell Programming" Here is just a record of the resource, recommended to the connection listed below for viewing with VC + + for Windows shell extension compiled by CCC compiler preamble: Seen Some extensions to the
Today, I wrote a shell script, which runs normally on my machine. To my colleagues, run the syntax error near unexpected token error. I can check the shell script on the left and right, but there is no way to search by Google, I found that a senior
Linux Command Line and shell script programming Daquan: Version 2ndBasic InformationAuthor: (US) Blum (R.) Bresnahan. c.) [Translator's introduction]Translator: Wu HaifengSeries name: Turing programming SeriesPress: People's post and
Use bin/hadoop FS to call the File System (FS) Shell Command. All FS shell commands use the URI path as the parameter. The URI format isScheme: // authority/path. For HDFS file systems, scheme isHDFSFor the local file system, scheme isFile. The
Differences between console, terminal, tty, shell, and other concepts
Linux has been used for some time, but I still cannot understand the differences between these concepts. Although I have been using it all the time, many concepts are vague, so it
Shell programming control structure: expr, let, for, while, until, shift, if, case, break, continue, function, select
1. expr calculates the integer variable value
S = 'expr 2 + 3'
The operator numbers and parameters must be separated by spaces;
2.
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