Shell Common Commands

"Set Environment variables"1. Use the ENV command to display all environment variables$ env2. Use the echo command to view a single environment variable$ echo $PATH3. Set a new environment variable$ export hello= "hello!"Syntax: Export

Bash Shell recursively implements file copy in directory

Preface to the work today encountered a problem, if you copy the file in directory A to directory B (premise directory B does not have the file), and maintain the structure of the file in directory A. The project focuses on the following:

Shell Script Learning Case List

chmod u+x./shxx1. Simple Shell Programming SH example executionDisplay the directory and file in which you are located$cat Example#!/bin/sh#this is to show what a example looks likeecho "Our first example"Echo # thisecho "We Are"/bin/pwdEchoecho

Linux Shell MAC address conversion convert with SED

Convert the 0024.b20b.693f address into a 00:24:b2:0b:69:3f1. Dot-delimited[Email protected] ~]# echo "0024.b20b.693f" | Sed-r ' s/\b (..) (..) \b/\1:\2/g;s/\./:/g '00:24:b2:0b:69:3f2. If the colon is separated, convert the 0024:b20b:693f to 00:24:b2

basename dirname read in the shell

1. basename is the name left after the directory is removed .example:shell>temp=/home/temp/1.testshell>base= ' basename $temp 'Shell>echo $baseThe result is: 1.test2. dirname is to fetch directory example:shell>temp=/home/temp/1.testshell>dir= '

How the shell changes the current working path

Reproduced:http://imysqldba.blog.51cto.com/1222376/616805There are three ways to execute a shell scriptBash script name sh script name chmod +xUse the following statement to test#a. SH (does not have extension)CD/Pwdecho "Complete"However, the

Shell Display with color font

echo Display in shell script with color display, echo display with color, need to use the parameter-e format as follows: Echo-e "\033[word background color; text color m string \033[0m" Example: Echo-e "\033[41;36m something Here \033[0m "where 41

HBase Shell Basics and Common commands

HBase is an open source implementation of Google BigTable, which leverages Hadoop HDFs as its file storage system, leverages Hadoop MapReduce to handle massive amounts of data in HBase, and leverages zookeeper as a collaborative service.1.

[Note]shell programming: mathematical calculations

In shell script, there are several ways to do math, although a few of the results are similar, in writing a program is enough to use a method, but we may also need to learn other people's program Ah, in the reading of other people's programs can not

Some shell command tricks in log processing

Some shell command tricks in log processingQuirks's log analysis, the future of the uncertainty of the day, the only thing that may also be a bit of a point is to manually handle a large number of logs. Sum up.The input to the log file is the text

Linux--shell Script

Here is a summary of some of the recent learning Shell script knowledge pointsBlog Park-Bang Bang sauce Good * * *1. IntroductionThe shell is a text interface that lets us communicate with the system. The shell script is the one written for the

Shell Common Criteria for judging

1, determine if the folder existsif[-d/home/q/www];then Echo"true";ElseEcho"false"; Fi (folder exists in the system/home/q/www)2, determine whether the file existsif[-E/ETC/PASSWD];then Echo"true";ElseEcho"false"; Fiif[-F/ETC/PASSWD];then Echo"true";

Shell Date formatted output

1-echo ' Date ' +%y-%m-%d%h:%m:%s "'2014-11-13 15:06:262-echo ' Date ' +%y-%m-%d%h:%m:%s "'14-11-13 15:06:51Note: "+%y-%m-%d%h:%m:%s" caseThe given format controls the output, and the sequence is interpreted as follows:Percent of a text%%a of the

Shell script GBK Environment Search Utf-8 Log

Method 1:Use Linux iconv to convert the Utf-8 log to GBK encoded file, and then gbk the statistics in the environment. UTF8 () { log_file= "/lcims/crontab_shell/outfile/lan_wlan_wo/socketmain.log141114_lan1" LOG_FILE_TMP= "/

You may not know the shell

The shell is also called the command line interface, which is the interface between the user and the computer under the *nix operating system. The word shell refers to the program in the operating system that provides access to the kernel service.

Using the shell to turn the time string and time stamp to each other

The detailed user of date can refer to the followingHttp://www.cnblogs.com/xd502djj/archive/2010/12/29/1919478.htmlThe specific use of date can be viewed in another post, "Shell Date command Detail" http://blog.csdn.net/runming918/article/details/722

Shell's multi-process

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http

Very powerful shell written by Tetris

A Tetris that was written on the web with a Linux shell script. It's the best shell I've ever seen written. Share a bit.The original author information is in the comments of the script.#!/bin/bash # Tetris game# 10.21.2003 xhchen #APP declarationAPP_

Shell's awk associative array advanced application

Recently due to data migration, some user information needs to be re-confirmed, perhaps a large amount of data, but the need for the final confirmation of such as the user ID and its corresponding number of user points, which will lead to the

Shell-find error parsing, shell-find Parsing

Shell-find error parsing, shell-find Parsing I have written an article about how to use shell to regularly clear expired files. In fact, the simple find command is used. After my colleague adopted the script, he encountered several errors when

Total Pages: 541 1 .... 201 202 203 204 205 .... 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.