Setting the default environment variable of Shell in Linux (BASH)

In Linux, shell is a commonly used tool. In Red Hat Linux, we usually use B shell or bash. In Shell, we always want to set some environment variables or other initialization operations when opening this shell. But how can we do this? Although we can

Built-in commands, functions, and external commands in Shell

shell recognition: built-in commands, Shell functions, and external commands: (1) the built-in command is the command executed by the shell itself. some commands are built-in because of their necessity. For example, if CD is used to change

Unix shell book

1. Basic Knowledge CAT/etc/ShellCHSH/bin/tcshEmacs = Vi?PdkshZsh B C KPID is 1 not 0 Home variables exists in passwd, And the last entry of passwd is sh. PS-Ef svr4PS au for BSD/Linux ps Echo $ statusEcho $? EUID // can be changed, like

Aix5.3 install the bash shell Environment

BASH Shell is the default shell in Linux. It can be supplemented by tab, and historical commands such as up/down key switching are easier to use than the default KSh shell in Aix (most Unix systems. All Linux software that can be installed under

How to use Linux Shell Variables

I. Use of local variablesLocal variables act only in this shell, just like local variables. It does not affect variables in other shells. 1. Show variable valuesYou can use the echo command. Note that you must add the $ symbol before the variable

Shift command in Shell

Okay. Run this script and you will understand it.#! /Bin/bash Until [ $ #-EQ 0] Do Echo "$ @" Shift Done See the role. When shift (without parameters) is run each time, a parameter is destroyed and the subsequent parameter is moved forward.

Why is an error reported when you enter the ADB shell command in the doscommand line?

in command line (that is, start-run-input cmd) mode, if you enter the ADB shell command, two errors are generally reported. One is that" ADB is not an internal command or an external command, it is neither a running Program or a batch file. The

Shell knowledge point supplement (3)-Modify the language/special characters/printf/SED tool/awk tool/diff/CMP

1. The method for modifying the language family is: [Root @ test root] # lang = en (specify other syntaxes as needed, such as C) [Root @ test root] # export Lang Linux VI deletes all specified characters Press ESC to return the command

[Practice] obtain shell remotely through qpopper2.53

Obtain shell remotely through qpopper2.53 Created at: 2000-05-27Article attributes: originalArticle submission: Quack (quack_at_xfocus.org) Obtain shell remotely through qpopper2.53 By quackReference: Bufferoverflow secrurity advisory #5 by prizm*

How to determine parameters in the IF statement for Linux Shell Programming

Use the if statement to determine parameters in shell programming -B. returns true if the file exists and is a block file. -C: returns true if the file exists and is a character file. -D. If pathname exists and is a directory, true is returned. -E:

Special Use of shell brackets

The parentheses in shell have their special usage, which are summarized as follows:1. brackets after the symbol $The value of $ {A} variable A can be omitted without ambiguity.$ (CMD) command is replaced and the result is the output of Shell Command

APIS for file path operations in Shell

In the past, when I was writing code, I encountered a problem with the file path. for example, extract the directory or file name of the file path and determine whether the directory or file exists. every time you encounter such a problem, you

Simple shell script for Linux Server monitoring website status

#! /Bin/shwebsite [0] = 'zufang .hfhouse.com/chuzu/' # Website 1 mobile [0] = '000000' # Website 1 mobile number website [1] = 'oldhouse .hfhouse.com/chushou/' # Same as 2 mobile [1] = '000000' # Same as above 2 # and so on, if there are too many

Shell date command details

Date + % s can get UNIX timestamp;Use shell to convert time strings and timestamps:Date-d "00:00:00" + % s output format: 1287331200The time stamp can be converted to a string as follows:Date-d @ 1287331200 "+ % Y-% m-% d" output format:

Shell condition test

  Shell condition tests are usually used in control flow structures such as for, while, until, and if to determine the relationship between the object's related properties or variables. Usage of conditional test: Test Result: If the value is true, 0

Shell programming (2)

Shortcut Operators If you are familiar with the C language, you may like the following expressions: [-F "/etc/shadow"] & echo "This computer uses shadow passwors" Here & is a shortcut operator. If the expression on the left is true, execute the

Linux Bash Shell Learning (7): shell programming basics-running Shell scripts and functions

This article is the fourth chapter of Learning the bash Shell 3rd Edition, Basic Shell Programming, but we will not limit it to this. Run the shell script program A script containing shell commands is a shell program, such as. bash_profile. We can

Shell script learning notes (2)-Variables

Variables and strings Bash shell does not have the so-called "Data Form" unless the built-in declare is used to specify the variable type. In Bash shell, there is only one data type: A string consisting of Characters Use it without having to go

Shell script learning notes (8)-process management and work control

Process management and work control Use of ps, top, and htop commands Transmit signal You can use the kill command to manage the signal sent by the process. The basic principle for managing processes is 1. First, send a signal to the process so that

SHELL arithmetic operations and Comparison

Arithmetic Operations and Comparison 1. Operator (let identifier) + Addition-subtraction * multiplication/division ** power operation 3 let "z = 5 ** 3" % modulo bash $ expr 5% 3 2. comparison operator (note that a space is required between []

Total Pages: 541 1 .... 334 335 336 337 338 .... 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.