Export comprehension in shell

It has long been assumed that the export-after variables in the shell script will affect the environment variables in the terminal that executes the shell. The concept of environment variables is not unique to the shell, but is owned by the process

Shell Set Understanding

In the load-spark-env.sh script below the spark bin , there are the following statements: If [-F "${user_conf_dir}/spark-env.sh"]; Then # Promote all variable declarations to environment (exported) variables set-a . "${user_conf_dir}/spark-

shell--parameter passing

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

Shell Getting Started Tutorial: Process Control (4) Case condition judgment

Syntax structure of case:Case to test item in style string 1] command area 1;;( Style string 2) command area 2;; Style string 3) command area 3;; *) command area;; Esac Command area, can be a single instruction or multi-line instruction, but

Shell of Linux Basics (1)

The shell acts as an interface between the user and the kernel in the Linux system, which is used to convert the commands entered by the user into instructions that the kernel can understand, and then to perform the corresponding functions through

Shell script calls a stored procedure with parameters

Mainly has#!/bin/bashsource /etc/profilesource ~/.bash_profile################################################ ################## #功能描述: Call a stored procedure with input parameters and output parameters # Execution period: Day # crontab: * 1 * * * 

Shell's basic commands

There are a number of ways to intercept strings in the shell, ${expression} There are 9 ways to use them. ${parameter:-word}${parameter:=word}${parameter:?word}${parameter:+word} The above 4 alternatives can be used for default values. ${#parameter}

Shell environment variables & parameter variables

Environment variables $HOME Home directory of the current user $PATH A colon-delimited list of directories to search for commands $PS 1 A command prompt, usually a $ character, but in bash,

Shell IFS Example

IFS is the split symbol, the AA BB cc DD separately is $ $ $ $, when i=3, assigned to B DD. [[email protected] test]# cat 1#!/bin/basha= "AA:BB:CC:DD" ifs= ":" I=0for B in $A;d o [$i-eq 3] &                & b= $B; Let i++;d One;echo $b; [[Email

Shell's/bin/bash script base combat

I rookie a, first contact with the Linux shell script;Shell script, the simplest function is to write a lot of instructions together, so that users can easily be able to execute multiple commands, and shell script provides arrays, loops, conditions

Shell contains all the decompressed functions

bz2

#!/bin/sh ()  {        if [ -f $1 ];then                 case $1 in                    *.TAR.BZ2)       tar xjf $1       ;;                          *.tar.gz)        tar xzf $1       ;;                    *.BZ2)           bunzip2  $1      ;;         

Write a mock shell under Linux

1, first understand the Shell's basic framework650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/83/46/wKioL1duhrXze92MAAAmKDBM0i0805.png "title=" 2016-06-25 21-26-40 screen. png "alt=" Wkiol1duhrxze92maaamkdbm0i0805.png "/>As shown[User

Shell Script--sed Tool

SedSED: it is called a streaming editor, and its working scenario is typically in the editor, where a piece of text is read in the SED in a row and then output in the specified way, which is its most basic usage.First, the basic operation of

Linux----->shell Advanced Programming----grep application

1. BackgroundWhen it comes to shell programming, we have to mention regular expressions, the "old guy" that can look like a new programming language, and let a lot of our just-in-the-box programmers love and hate because they can actually write

Shell Small Script

Ask for 1-100 and A. Non-recursive1 #!/bin/bash 2 sum=0 3 str= "" 4 for I in {1..100} 5 does 6 let sum+=i 7 str+= "$i +" 8 done 9 echo ${str%+}= $sumOutput Result:650) this.width=650; "src="

The grep tool under the shell

One. grepgrep (Globally search a Regular Expression and Print) is a powerful text search tool , it can use regular expressions to search for text, print matching rows, but does not affect the contents of the original file , and by the return value

Shell Programming Arry Arrays

1. Copying and fetching valuesAssign Value #!/bin/basharry_name= (xiaoming xiaoli dalong Sanlang) echo ${arry_name[0]}echo ${arry_name[1]}echo ${arry_name[2] }echo ${arry_name[3]}[[email protected] ~]# bash Arry.shxiaomingxiaolidalongsanlang[[email

Two tips for Linux shell: Shell arrays and string judgments

Recently, when using shell to write scripts, I want to implement two very simple functions in Python: 1: Determine if a string contains another string. 2: How to implement the list of Python work: 1. Here to share with you.1: Determine if a string

Introduction to Windows Remote Shell (WinRM) usage

Recently, in order to experiment with the installation of Windows Server Core server, the system without a graphical interface always gives a very complete feeling, we have the idea of security in the end, using the Windows Remote Shell management

Windows Server Core Settings Shell

Hkey_local_machine/software/microsoft/windows Nt/currentversion/winlogon/shell1) Windows Server 2012,minshell switch to Server Core:Open cmd-> Input "PowerShell", enter "uninstall-windowsfeature server-gui-mgmt-infra–restart" and wait for it to

Total Pages: 541 1 .... 466 467 468 469 470 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.