playing Linux does not know the shell, that is, do not understand Linux. This statement is enough to witness the shell's position in Linux operations. Always want to write down the shell, but always do not know how to write, not because the shell is
${} for reading, extracting and replacing strings, you can use ${} to extract the string 1, extract the file name [[email protected] log]# Var=/dir1/dir2/file.txt[[email protected] log]# Echo ${VAR##*/}FILE.TXT2, extract suffix [[email protected]
Reprinted from: Coolshell ChenhaoThe 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
script content #!/bin/bashfor I in "1" "2" "3" "4" "5" "6" "7" "8" "9" do   ; for J in "1" "2" "3" "4" "5" "6" "7" "8" "9" do IF [${j}-lt ${i}] &nbs P then
Summary of Shell Small issuesThis article source: http://blog.csdn.net/bluishglc/article/details/44276607 prohibited any form of reprint, or will entrust CSDN official maintenance rights!
Summary of Shell Small issues
If
1. Fake Cookie Login system (in fact, this step is redundant, most users do not change the password, are the default 123456)Login successfully set 4 cookies, see CodefunctionLogin$lusername,$lpassword,$key,$lifetime=0) {Global $set _username,$set
Set-o VIYou can use the last command with the Esc+k key again.Esc+kEsc+jUpside DownKsh default is Emacs style. Set-o EmacsUse the commands you've already used under AIXUsed under AIX, the default shell is Ksh, unlike bash under Linux, he can't use
Last time I wrote the shell, I found that VI and VIM are different: Vim is the upgrade version of VI, it is not only compatible with all VI directives, but also some new features in it. Vim is much more useful than VI.This time the last content, the
Recently scripting, I often see conditional statements with the IF [-X $variable] class, not knowing what the meaning of the corresponding parameter is,The excerpt is as follows: from http://blog.csdn.net/aaaaatiger/article/details/1713611thanks!1[ -
The script implements a 2-per-scan monitoring of the process for the specified process name and restarts once the discovery process does not exist.#!/bin/sha=10;While [[@a-gt 5]]; Doif test $ (pgrep-f $1|wc-l)-eq 2;thenSH stop.shGnome-terminal-x SH
In the shell, the command execution succeeds with a return value of 0, and the unsuccessful return value is not 0Logic with:Shell 0 is true, not 0 is falseWhen the first condition is true, the second condition must be judged;When the first condition
Typically, we enter commands from the command line each time to get a response from the system. This is obviously inefficient when we need to enter commands one after the other and finally get the results. To achieve this, we usually use shell
The tool jar package is available in: http://download.csdn.net/detail/shenjianox/7769783 and documentationGANYMED-SSH2 Introduction:Ganymed SSH-2 for Java is a package that implements the SSH-2 protocol with pure Java. It's very easy to use it,
I. Introduction to HDFS shell commands
We all know that HDFS is a distributed file system for data access. HDFS operations are basic operations of the file system, such as file creation, modification, deletion, and modification permissions, folder
Preface:
SSH command. No password parameter is specified. so that when using the SSH command in the script, you must manually enter the password to continue the execution. this makes the automatic execution of scripts very poor, especially when the
[Copyright statement: reprinted. Please retain the Source: blog.csdn.net/gentleliu. Mail: shallnew at 163 dot com]
Like printf in the previous section, the cycle judgment of awk is similar to the cycle judgment Syntax of C language.1. While
There seems to be no odd deal in this Internet field. Recently, the merger and acquisition of hongtu sanbao has handled the transaction, which is somewhat "Incredible ". It seems understandable to be an Internet giant, but a traditional company with
What is the difference between shell learning ?, Where does shell learn?Strictly speaking,
Because 0 is the default value of
> This method is used to export data to a file. If the file does not exist, the file is created. If the file exists,
Learning bash notes-debugging shell programs
In shell, the simplest debugging assistant outputs the echo statement. Many echo statements can be put into the code for debugging, but it takes enough time to locate
The information to view. You may need
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