Shell Programming Notes (i) __ programming

Tee Cat >> Test &m Tee To redirect output to files and screens at the same time: Date | Tee now Cat >> test Use a custom delimiter to create a documentDelimiter is a delimiter, customizable, and we're using append redirectionThe above command

Shell script timed task--log compression (delete)

A problem encountered earlier is that the log file is too large to occupy the disk space and cause the build project to fail So I wanted to write a timed task. Delete a log or compress a log file I've been on the internet for a long time and haven't

"Shell script Learning" shift command learning

Positional parameters can be moved left with the shift command. For example, shift 3 means that the original $ $ is now $, the original $ $, and so on, the original $ $, $ $, $ $ no move. The shift command with no parameters is equal to shift

Shell programming for loops __HTML5 under Linux

Linux for loops can use break and continue keywords to jump out of loops, consistent with Java usage a common for loop structure #语法一 for variable in value 1 value 2 value 3. Do program block done # #语法二 The for variable ' command ' do

"Shell" condition

First, there is only one type of string in the shell, no shaping or floating-point type. However, when you define a variable, you can use single quotes, double quotes, and no quotes. Without quotes, if the variable has a white character inside it,

Shell script Programming Basic article--Several special symbols __ programming

* Inverted quotes ' and $ () * Let's demonstrate a comparison of the output results using the inverted quotes and $ () For this result, is because the $ () in $ () has escaped to get this result because of the two \=\ in the inverted

disconf Java Boot shell

1. startup file: service-restart.sh #!/bin/sh # java ENV source/etc/profile export java_home=/usr/local/jdk1.7.0_75 export jre_home= $JAVA _home/jre if [$# != 3]; Then echo "USAGE: $ service_dir service_name_pre disconf_env" echo "e.g.:

Linux shell Programming Notes-Common find and xargs__ block chains

The Find command tool is used to locate files in the directory (or even the entire file system), search Path_name-option [-print-exec-ok] #find的一般格式; 1, Find command Options (-option) 1.1. Find files and directories by name (-name):cb@standalone14:~

Progress bar (Shell)

C. Progress bar prepared by:http://blog.csdn.net/addw1/article/details/55292922 Shell writing #!/bin/bash function Bar () { i=0 bar= ' lable= (' | ') ' \ \ '-'/' index=0 while [$i-le] do #printf ' [%-100s][%d%%][%c]\r '

Crontab and shell scripts to implement Linux timing tasks __linux

The writing of Linux shell scripts VI test.sh #!/bin/bash ################### . /etc/profile . ~/.bash_profile ################## Path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Cd/home/huaxia/syslog2db&&ruby app.rb

Git shell displays Chinese

Original address: http://www.cnblogs.com/Gukw/archive/2012/01/16/2323417.html 1,/etc/gitconfig:[GUI] encoding = Utf-8 #代码库统一用urf-8 to display Chinese in the Git GUI[i18n] commitencoding = GB2312 #log编码, window under the default gb2312,

HBase access Mode HBase shell

how hbase is accessed1. Native Java API: The most conventional and efficient way to access;2, hbase shell:hbase command line tool, the simplest interface, suitable for hbase management use;3, Thrift Gateway: The use of Thrift serialization

Shell to bulk modify file name under Directory

Shell to bulk modify file name under folder: Parameters: Incoming file path, such as: $./batch_rename_files.bat /home/xx/channel/ #!/bin/bash echo "Start programming ..." # #for i in ' ls * ' CD $ # #for i in ' ls-r | grep "erl*" '

Written question Shell

Enterprise Practice question 1: (Production actual case): monitor MySQL master-slave synchronization is abnormal, if abnormal, send sms or mail to the administrator. Note: If there is no master-slave synchronization environment, you can use the

Do not fully defragment the shell statements in makefile (mainly for utility only)

1. Some common functions Wildcard wildcard is a pattern matching function, the function model is roughly $ (wildcard parameter), the function's return value is the file that is actually found after the match, or other, depending on the argument,

Does the shell associated index subscript have a limit on strings?

#!/bin/sh if [[$#! = 1]]; Then echo $ basepath; echo; Fi path=$1; Declare-a Statearray; (Find $path-type f-print) | while read line; Do #echo "----" echo $line; #echo "----" ftype= ' File-b "$line"; Ftype= ' echo ' $ftype | Cut-f 1-d ""; echo

Shell Learning File expression

File expression -e filename true if filename exists -d filename If filename is a directory, true -F filename True if filename is a regular file -L filename True if filename is a symbolic link -r filename If filename is readable, true -W filename if

Start HBase hmaster in eclise, play shell

First Master: Parameters: Run the HBase shell hbase Shell Parameters the shell that runs up after HBase Try to run a few orders to find out: Create ' T_person ', ' no ', ' name ' create ' t_person ', ' no ', ' name ' 0 row (s) in 2.

shell| When you enter an interaction, the input results are displayed on the same line as the prompt statement

Normal way:#! /bin/bashecho "Please enter your name:" Read Nameecho "your name is $name." 123456 result: [Email protected] ~]#./jiaohu.sh Please enter your name:yvesyour name is Yves. [[email protected] ~]# 12345 The following two ways to

Use the bash shell, for, and while loops to calculate the 1-100 and.

first, use the For loop to calculate the 1-100 and. Here I list two ways, please peer more suggestions. Propose a better method or a more optimized small script program。1. With for I in mode:[[email protected] ~]# vim forin.sh #!bin/bash#The for i

Total Pages: 541 1 .... 513 514 515 516 517 .... 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.