Shell Display-bash-4.1# Workaround

When operating on SECURECRT, do the following carelessly:?????????????????? [[email protected] ~]# echo "Alias rm= ' echo this command does '" ">. Bash_profile?????????????????? [[Email protected] ~] #source. bash_profile?????????????? When the

Daily shell exercise (--sed) processing

1. ExercisesFor a file, 1 to 5 lines delete the line with English, 6 to 10 lines delete the English characters inside;2. AnalysisThis requirement, with the SED command can be solved, mainly used to match the knowledge of replacement.3. Scripts#!/bin/

Deployment of the Shell

Shell's unfolding 2018-5-30? writen by Stephen.yu First, path name expansionBefore the shell executes the echo command, it automatically expands any qualifying characters on the command line, for example, * is expanded to the current path

Django Shell Operations

Plugin: django-extensionsdjango-extensions==1.9.8PIP3 Install Django-extensions1. Database shell commands (under project directory)Python3 manage.py DbshellExecute SQL statement2. View the SQL statements for the Django

Shell Programming (2)

1. (1) Change the main prompt to the user's home directory name (hint: reference material 4.6.8 section environment variable PS1 and HOME usage)(2) Assign the string DOS file c:>\ $student \* to the variable x and display it (hint: note the choice

Shell conditional expression

In shell programming, it is often necessary to determine the status of a file, whether the string is equal, and two numeric values, and then perform the related operations based on these comparisons. This paper mainly describes the file status,

Shell (i)

File header#!/bin/shBasic syntax:Define variables:Your_name= "Aivy"In addition to explicitly assigning values directly, you can also assign a value to a variable using a statement: for file in ' ls/etc ' or for file in $ (LS/ETC)The above statement

Shell Script Summary

1. VariablesA: Define variable a=1, only valid for your shell processB: Define the variable export b=1, which will take effect on your shell process and its child processesC: Variables defined in the script.sh script, when source script.sh is in the

The difference between Shell $* and $@

1#! /bin/Bash2 Test () {3echo "not quoted, same as"4Echo $*5echo [email protected]6echo "Add quotation mark and contrast"7 forN in "$*"8 Do9 Echo $NTen Done One Aecho "----------" - forN in "[email protected]" -

Shell–grep Common usage

is a powerful text search tool that can use regular expressions to search for text and print matching lines.I often use it to find strings such as: grep -rn "字符串" .Recursively finds the "string" in all files in the current directory and the line

Shell for Loop Practice

The For loop syntax is structured as follows [[email protected] tmp]# cat 1 . sh # !/bin/bash for i in ' Seq 3 " do echo $i done [[email protected] tmp]# sh 1 . sh 1 2 3 Bulk Modify file name [email protected] tmp]# ll

The Column-aligned field of the shell command

You can convert text results to neat tables, upper and lower commands: ColumnParameters to use:-T: Table with a space interval by default-S: Required with-t use, specify delimiter?Monitor Ogg named field alignment [[Email protected]

008-shell Process Control

First, if else1.1, ifIf statement syntax format:if condition Then command1 command2 ... fiWrite a line (for the terminal command prompt):if [$ (PSgrep"ssh"1thenecho" True"fiAt the end of the fi is if the upside-down spelling, and later

003-shell Passing parameters

I. OverviewYou can pass parameters to the script when you execute 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 to

Shell script $ $n, $*,$#,$$,$!,$?,$-,$@

The execution name of this program $n the nth parameter value of the program, n=1..9$* all parameters of the program, which can be more than 9 parameters.     $# the number of parameters for this program $$ the PID of the program (the current number

Shell conditional expression

1. The common syntax for conditional testing is as follows1, test expression2. [Test expression] #两边需要有空格3, [[Test expression]]4, (test expression))DescriptionThe first and second are equivalent, the third is the extended Test command, and syntax 4

Shell Script Forloops

1. Determine the type of all files in the/var/directoryfor files in /var/* ;do if [[ -f $files ]];then echo "$files exists and is a regular file." elif [[ -h $files ]] ;then echo "$files is a symbolic link." elif [[ -d

Shell script from getting started to complex its eight (function)

The Linux shell can be user-defined functions and can be called casually in shell scripts. Shell functions exist in memory, not hard disk files, so it's fast, and the shell can preprocess functions, so the function starts faster than the script.Note:

Functions, arrays in 71.shell

One, the function in shell script? The function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call the name of the small unit directly.Format: function F_name (){command} function

Java executes shell scripts and outputs execution

1. Script test.sh, placed in the/users/hdwang directory#!/bin/sh/users/hdwangechols: 'ls'for (( i=1; i; i++)); Do Echo $ (expr31); Sleep 1s Done echo JPS: ' Jps-l '2.java Execution test.sh Public classExecshell { Public Static voidMain (string[]

Total Pages: 541 1 .... 509 510 511 512 513 .... 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.