When you learn UNP, you learn to quit the shell after adding the character "&" after the command, and the commands you run can continue to run. Puzzled reason, and to the Internet search the following, understand.
The following are the fragments of
Java EE Development of various types of resources download list, the history of the most complete IT resources, personal collection summary.
Objective:
No matter what programming language is inseparable from conditional judgment. The shell is no
Many people use the simple SSH connection tool, sometimes need to copy files in SSH to the local view more convenient, I would introduce a simple command of the SCP.The SCP is a security file copy, based on SSH login.Easy to operate, such as to the
A lot of people are learning C + + language First, then learn shell script. If you have a little programming base, it's easy to understand the so-called order, selection, and loop. Order structure In fact, there is nothing to say, before the contact
IFS:
The use of IFS directly to explain what the specific ifs is doing ... Own Google
First create a file of "a", and "a":
Then we look at the LS:
--> ls
a A a That is true.
And then if we need to write a script to manipulate each file:
--> for
Turn from: http://my.oschina.net/u/189445/blog/595232
HBase shell command
Describe
Alter
Modify Column family (family) mode
Count
Number of rows in the statistics table
Create
Create a
The conditional judgment statement in the shell is an upgrade to the previous "conditional test statement in the shell", meaning that the preceding test statement serves the IF~THEN~FI statement for the current judgment statement.
We're still
After logging into the system, we are the Shell interaction environment, use it every day to work, have a customized environment can make us more efficient.1.PS1 variableIt is found that there is a string of characters on the left side of the cursor
echo Outputecho instruction for the output of a stringFormat: Echo stringDirect output String: stringEcho ' This is String-output 'In double quotes, you can also omit quotes here.Escape character: \echo ' \ ' It is ok\ 'Variable: \valueEcho ' \value
20.5 logical judgments in shell scriptsYou should use a variable instead when you use a string more frequently in your script and the string length is longWhen using conditional statements, variables are often used?? If [$a-gt 1]; Then ...; FiWhen
[-A file] is true if file exists.[-B file] True if file exists and is a block special file.[-C file] True if file exists and is a word special.[-D file] True if file exists and is a directory.[-E File] True if file exists.[-F file] True if file
General PracticeCat>test.SH"'#!/bin/Bashexit_script () {Exit1}Echo "before Exit"Exit_scriptEcho "After exit"EOFchmodA+x test.SH./test.SHEcho$?# output before exit1You can see that direct use exit can exit the script, and you can pass the error code
First, prefaceThe shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.A Shell is an application that provides an interface through which users access the service of
It is necessary to specify the value of the command line option in the script. Getopts provides a way to place a colon after the option_string option, for example:
Getopts abcsd: Option
ABCs can be passed without adding actual parameter values,
Check whether the load commands of the machine include top, uptime, and W.
Uptime command
Admin@v011143.sqa.cm4 ~ $ Uptime 11:14:02 up 318 days, 1 user, load average: 0.78, 0.52, 0.58
11:14:02 current time
318 days from the last reboot to the
From: http://bbs.chinaunix.net/viewthread.php? Tid = 446683
Quote:
The original post is published by "net player:
For example, in Linux, you can find grep, egrep, and fgrep programs. The differences are roughly as follows:
* Grep:In traditional
When deploying a project on Linux, we often use a shell to start the program, or even regularly call the Java program through a crontab scheduled task. However, a strange problem is that, for example, I wrote the following shell script:
#! /Bin/sh
This article is part 3 of the fifth chapter of "Learning the bash Shell" 3rd Edition, Flow Control, but we will not limit this article. Flow control is a very common part of any programming language, including case. Here, we will continue to learn
One idea is to use awk to first create a conversion table between characters and ascii codes or numbers in the awin of awk, and then read the character table to be converted to output the corresponding conversion code. The following sample code
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.