Shell Script Summary 2

Echo ' seq-s ' 10 '--command to use anti-quoteecho $ (seq-s "" 10)(())LetExprBC--Features support for fractional counting$[]----------[Email protected] ~]# ((ruan=1*8-9))[Email protected] ~]# echo $ruan-1---------[Email protected] ~]# b=$

Shell Learning Example One

Enterprise Face question 1:Use the For loop to create a batch of 10 files in the/oldboy directory, with the name in turn:Oldboy-1Oldboy-2Oldboy-3......Oldboy-10Hint: In the future to test everyone file prefix is also random, the end is a number

[20150925] Linux file system and shell-Zhu Xiaoyang

Introduction to Linux file system and Shell file system Ext2/ext3/ext4EXT2 is the standard file system in the Gnu/linux system. This is the most used file system in Linux, which is designed specifically for Linux, with extremely fast speeds and

September 13 Tenth session Linux shell script programming Basics

Tag: blank linux target password nullHomework 1, request to add a user newuser, if it already exists then display "The user USERNAME is exists", if present, add it and set its password to "[email protected]"

CentOS Shell Basics 2015-4-8 12th Session

CentOS Shell Basics 2015-4-8 12th SessionThe first half of the classThe second half of the classHistory: Command history, save 1000 commands by default!! : Previous command!$: Last parameter of previous command!n: Executes the nth command in the

Shell Basic Features 2

                          Bash of the Base Infrastructure Special Sex21. provides a programming environment Program: Instruction + data program programming Style: Process: command-centric, data-serving instruction; Object type: Data-centric,

Shell base-bash variable-user-defined variable

Variable setting rules:Variable names can consist of letters, underscores, and numbers, but cannot start with a number.The default type of a variable in bash is a string type, and if a numeric operation is required, specify the variable type as

Dubbo Official Shell startup script (with JVM parameters)

#!/bin/bashcd ' dirname $ ' bin_dir= ' pwd ' CD. Deploy_dir= ' pwd ' conf_dir= $DEPLOY _dir/confserver_name= ' sed '/dubbo.application.name/!d;s/.*=//' conf/ dubbo.properties | Tr-d ' \ r ' server_protocol= ' sed '/dubbo.protocol.name/!d;s/.*=//'

Linux hard disk usage and Shell script implementation

Use df-tph to view hard disk usage under Linux:sdua:/# Df-tphfilesystem Type Size used Avail use% mounted On/dev/vda3 ext3 2.0G 974M 940M 51%/udev tmpfs 16G 500K 16G

About the Shell's source, point (.), and Export

Organize multiple sources from the network.1, source and Point command, the same function, the source is different.The source command is a built-in command of the Bash shell, which comes from C shell. Another notation for the source command is the

Shell (ii) operator

Numeric OperationsNeed to use exprOne=' Expr5 + Ten' echo $one two points Note: there is a space between the expression and the operator, for example2+2Is wrong must be written2 + 2The complete expression is to be ' contained ' note that this

Shell scripting improves

Shell scripting improves Date//view dates and times-S change Time date-s "2015-08-20 14:27:12"View time Date + "%y-%m-%d%h:%m:%s"-D Change Single time Date-d "-2 Days" +%f+%w Show weeks+%w show how many weeks this yearntpdate //Calibration time

Conditional Judgment of shell scripts

Scripting: Stacking of commandsThe first line of any script:#!/bin/bash: The Interpreter pathIn addition to the previous # number as a commentExecute permission before script execution: chmod +x file nameCondition Judgment in bash:Condition Test

Learn Hbase Shell basic additions and deletions to change statements

Input command hbase Shell entersTo view all tables that exist:ListTo view the table structure:Describe ' table name 'Query the contents of the table:Scan ' TABLENAME '-----For example have a student table to view it scan ' student 'Add, update data :

How to switch users to execute the appropriate command or shell script in a shell script

In general, you may need to switch the root user to another user for execution during the automation process, such as: OralceHowever, the execution of the command will return to the root user, continue to execute other commands under the root

environment variable configuration file for Shell programming

First, Introduction1. Variable type:User-defined variables (local variables)Environment variables: Define each user's operating environment, has learned path,ps1; to be permanent, write to the corresponding locationPre-defined variablesPositional

Shell Learning 4-when to use the shell

Because the shell appears to be a common feature between UNIX systems and is standardized by POSIX. As a result, shell scripts can be applied to many systems once they are "written attentively". Therefore, the reason to use shell scripts is based on:

SHELL-SCP automatically enter the password

On Linux, we can easily use the SCP command to copy files remotely, but because the SCP command itself has no save password option, so in the shell can not be like samba that way to save the password, more trouble, the following two implementation

Linux shell array creation and usage tips

Switch from Linux shell array creation and usage tipsThe Linux shell is much more powerful in programming than Windows batch processing, both in loops and operations. Data types are not comparable. Here's a summary of some of the things that an

Shell array creation and usage tips

The Linux shell is much more powerful in programming than Windows batch processing, both in loops and operations. Data types are not comparable. Here's a summary of some of the things that an individual does when it comes to working with arrays.1.

Total Pages: 541 1 .... 355 356 357 358 359 .... 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.