Parentheses in shell programming

Parentheses are used to run a group of commands, The command enclosed by () indicates to run in the sub-shell without affecting the current shell environment.The command enclosed by {} indicates that the command is run in the current shell, and

Modify the default shell

1. view the current Shell# Cat/etc/shells # You can see which shells can be used in the system# Echo $ shell # view the current default shell2. Why is no history prompt displayed when I press the up/down key?The current shell is not/bin/bash3.

Shell script learning-8 (SED command learning)

Example 10What is the execution sequence of many-e commands? [Rocrocket @ rocrocket programming] $ cat mysed.txtBeijing 2003Beijing 2004Beijing 2005Beijing 2006 Beijing 2007Beijing 2008[Rocrocket @ rocrocket programming] $ sed-E's/Beijing/London/G'

Practical shell command memo

Opening Remarks: here we will record some common bash commands, for example, memo and hope to help others solve some problems. 1. Check whether the file exists if [ -f ./foo.txt ]then echo the file existsfi 2. Check whether the directory exists

Take Shell notes ---- private dish of laruence

VI editing tool usage: Common commands: H, J, K, L correspond to the left, bottom, top, right CTRL + F flip forward CTRL + B flip back 0: Move to the first character of this line G moves to the last row of the file. N [enter] move the cursor down n

Here document in Shell

1. Glossary: The following is Wikipedia's explanation: Here document[1], also known as heredoc, hereis, here-string or here-script, is a shell (such as SH, CSH, KSh, Bash, powershell, and zsh) in the command line) and define a string method in the

Default variable of shell script ($0, $1 ...)

  Suppose I want to run a script with parameters. After running the script, the screen displays the following data: What is the program file name? How many parameters are there? If the number of parameters is smaller than 2, the user is notified

Shell script FAQ

Document directory Determine whether the file is a device file Add User: IP address access statistics: Calculate the sum of 2 numbers Text Analysis File Sorting Print the swap partition size of the Local Machine Output the time used to

Notes on Linux Shell

1. query all files with no Suffix in the current directory: Find.-Type F-and! -Name "*.*" 2. query all files in the current folder that use the Windows Line Break (CRLF) and have no suffix. Use the-M parameter to convert them to Unix format (LF ).

Linux Shell study note 4

6th hours Process 6.1 start a process In UNIX, whenever a command is executed, it creates or starts a new process. For example, when you use the LS command to list a directory, a process is started.   The operating system uses a five-digit ID called

Linux Shell study notes 7

The eighth Condition Statement 10.1.1 is a simple if statement $ if 3> 2; then Echo 3; else Echo 2; FI # This is the form of $ cat> test in the command line. sh #! /Bin/shif 3> 2; thenecho 3 elseecho 2fi10. 1.2 use the test format: Test expression

Shell awk Regular Expression matching

Today, we can see that awk in a shell script processes strings, and there is a gsub ("\\. [0-9] + $ "," ", $2), and the $2 format is 00:12:13. 333, this gsub wants to put. 333. The regular expression in the regular expression cannot be matched. it's

Windows Power Shell

Http://baike.baidu.com/view/2838635.htm? Fromid = 58531 Windows Power shell ask for help editing encyclopedia business cards Windows Power Shell Windows powershell is a command line shell program and script environment that allows command line

Bash instance, Part 1-basic programming of Bourne again shell (BASH)

By learning how to program using the bash scripting language, you can make the daily interaction of Linux more interesting and productive. You can also use the familiar and favorite standard UNIX concepts (such as pipelines and redirection ). In

Shell script learning: SED, grep, sort, and uniq must be carefully read"

This afternoon, I was busy writing a small script one afternoon. There were a lot of errors in the middle. I found the details about sort and uniq, and I found some minor mistakes in writing the script myself, programming is a strictly prohibited

Shell script learning: Step-by-step program selects stream and Regular Expression

Like other programming languages, shell scripts provide if esle, do while, for, case, and so on for program execution streams. Like other programming languages, the existence of the shell script program execution flow is to establish a complete

Shell script learning-2

1. Use shell programming to determine whether a file is a block or character device file. If it is copied to the/dev directory. #! /Bin/bash# 1.sh# Determine whether a file is a character or a block device file. If it is copied to the/dev directory#

Shell script learning-6 (SED command learning)

5 is there an option in sed? Is there anything that is commonly used? Sed's most important part is the command part. If you have played this part, you are already very good. The premise of playing this part is to play with the regular expression.

General shelling steps and example of encrypted Shell

Today, I am mainly going to have a deep understanding of the assembly language. If I want to decompile the language, this is not enough. Of course, this is not a day or two that can be successful. Continue to work hard.   I. How to distinguish the

Shell programming: conversion and calculation between strings and values

Shell programming usually requires operations on strings. Sometimes, you need to convert strings into numerical values and perform addition and subtraction operations. The following describes how to convert a string into a numeric value and

Total Pages: 541 1 .... 453 454 455 456 457 .... 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.