Programming languages: Machine language, assembly language, advanced languagesStatic language: Compiler language, features: strongly typed ( variables must be declared before they are used, or even initialized ), and converted to executables.
The commonly used loops have a for loop and a while loop.
For loop
[email protected] sbin]# cat for.sh#! /bin/bashfor i in ' seq 1 5 '; Do Echo $idoneA sequence in the script that seq 1 5 represents from 1 to 5. You can run this
This article is reproduced from http://blog.chinaunix.net/uid-22566367-id-381955.htmlSelf-documenting content. The shell script that encountered the relevant content in the project. Record in this placestring1="111 222 333 4444"echo $STRING 1echo"$
Shell Programming for loop Summary
In shell programming, the execution of a loop is repeated several times for a piece of code, a common loop has a for, while, and a until loop, where the for loop is often used for finite cycles, and the
/********************************************************************* * Makefile How to use shell if judgment * Description: * For example, it may be necessary to determine the existence of files, folders in Makfile, use shell syntax * To output
Name: lsFeatures: View a list of files1[Email protected]6380-mt:~$ls2Add-on.yaml Desktop examples.desktop meta-gnome3-3.8+4UBUNTU3 PERL5 pycharm-2016.2.2 suVideos3Admin.conf docker-ce_17.03.1~ce-0~ubuntu-trusty_amd64.deb
The new handwriting of the shell, write bad, please forgive us.Hope to make some great gods and peers. qq:86416192 welcome everyone to add QQ.1, write a script, show how many users, and display the ID of each user.#!/bin/bashFile= "/etc/passwd"lines=
Shell Foundation: Shell is the user interface of the system, which provides an interface for users to interact with the kernel. It receives the command entered by the user and feeds it into the kernel to execute. We followed the Shell's grammar
When you run the script, you need to change the color of the text to improve the readability of the standard output.The echo command and the printf command enable this functionality.Formatted output can be implemented using the printf command, which
TextAaaaabbbbbcccccddddEeeeefffffkkkkkvvvvNnnnngggggThe results I hope to receive are as follows: AAAAA|BBBBB|CCCCC|DDDDEeeee|fffff|kkkkk|vvvvNnnnn|gggggMatch requirements: You want to insert a "|" between every 5 characters, and if the number of
CutThe Cut command extracts text columns from a text file or text stream.Cut grammar[[email protected] ~]# cut-d ' The delimiter character '-f fields The PATH variable is as follows[Email protected] ~]# echo
The following instance is used in the Centos6.5 64-bit operating systemOne, the regular copy fileA. Create the tomcatback.sh file in the/usr/local/wfjb_web_back directoryFile contents:#将tomcat中的应用wfjb_web copied to the/usr/local/wfjb_web_back/tomcat_
Http://www.1987.name/141.htmlShell Basics
Terminal printing , arithmetic operations , frequently used variables
Search for a specific string under the specified folder and highlight matching keywords under Linux
Get standard input from a
Shell script automatically adds black malicious attack IPSystem environment: Centos 6.5 X64If we open the SSH 22 port to all the users, then we can see in the/var/log/secure file, where the face is full of malicious attacks of IP, then how can we
In bash, $, * 、?、 [,], ', ', ', \, have special meanings. Similar to the compiler's pre-compilation process, bash, in the process of scanning the command line, will first interpret all the special characters at the text level, and then make the
The main record is the concurrency and serial execution of commands in the shell script.By default, the commands in the shell script are executed serially, and must wait until the previous command is finished before executing the next command, but
---restore content starts---File test expression-F file exists and is a normal file-D file exists and is a directory file-S file size is not 0 true-e file exists then true-R file is saved and readable #文件属性对于root有时不好用-W Write-X execution-L exists
A. Shell command1. Enter the HBase command line./hbase Shell2. Display the list of tables in HBase3. Create a user table, including info, data two column familiesCreate ' user ', ' info ', ' data 'Create ' user ', {NAME = ' info ', VERSIONS = ' 3 '}4
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