Shell determines whether a file exists

Example The difference between-E and-F is that-F stands for regular files (regular file), and-E represents all types of filesRefer to the following:-e filename true if filename exists-F filename True if filename is a regular file-L filename True

Shell-based if statement

In determining the size of a value in addition to (()) can be used in the form of [] but can not use;, If statementif Judgment statement; ThenCommandFiIf,else statementsif Judgment statement; ThenCommandElseCommandFiIf Elif statementIf Judgment

Shell quotes are useful

1 single quotation marksSingle quotation marks can be used to restore the literal meaning of characters, to implement the function of shielding metacharacters, single quotes must be used in pairs[Email protected]~]# echo ' $JAVA _home 'Special

Shell command shortcut keys

In the shell command terminal, CTRL + N equals the direction-down direction key, ctrl+p the direction key that corresponds to the direction.   in the command terminal through them or the arrow keys can be used to quickly find the history command.

Shell implementation of multi-level menu scripting

This article mainly introduces the shell implementation of multi-level menu system Installation script instance sharing, this script with multi-level menu to achieve lamp, LNMP installation display effect, the need for Friends can refer to:Hint:

Shell eval Usage

Transferred from: http://blog.csdn.net/w_ww_w/article/details/7075867Eval can read a series of parameters and then execute them according to the characteristics of the parameters themselves. Eval is a shell built-in command that can be used by the

What does "-e,-d,-f" mean in a shell under Linux?

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

Linux Shell Basics (vii)

16. File Lookup Command find:Here's a sample of the main applications for the Find command:/> Ls-l#列出当前目录下所包含的测试文件-rw-r--r--. 1 root root 48217 Nov 00:57 Install.log-rw-r--r--. 1 root root Panax notoginseng 00:56 testfile.dat-rw-r--r--. 1 root root 1

Linux Shell Basics (ii)

Seven. grep family: 1. grep exit Status: 0: Indicates success; 1: Indicates that a matching pattern could not be found in the supplied file; 2: Indicates that the file provided in the parameter does not exist. See the example below: /> grep '

Shell Programming (iii)

Bash basic features: command line expansion~: Automatically expands to the user's home directory, or the specified user's home directory;{}: A comma-delimited list of paths can be hosted and can be expanded to multiple paths;For example:/tmp/{a,b}

Fourth Chapter Shell Process Control

Process Control is the instruction that alters the order of the program's operation.4.1 If statement4.1.1 Single Branchan If condition expression; Then command fiExample:#!/bin/bashn=10if [$N-gt 5]; then echo yesfi# bash Test.shyes4.1.2 Dual

Hbase Shell Operations Summary

Enter HBase command line./hbase ShellShow tables in HBaseListCreate a user table with info, data two column familiesCreate ' users ', ' info ', ' data 'You can also use the This command:Create ' users ', {NAME = ' info ', VERSIONS = ' 3 '}Insert

A simple shell tutorial

Shell TutorialsThe 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

Jenkins+git+maven+shell implementation of Project one-click Release

First, prefaceAs is known to all, Jenkins can implement project updates by default (via SVN, but our company uses git), and projects are released through (Maven plugin), but in this case under some containers (such as Tomcat), The JVM will report

Shell Script Example

#!/bin/bash######################################################## Name:shell_exp.sh# version:v21.0# function:backup MySQL Databases Template Script# Author:zz# Create Date:2016-12-03# Description:study###############################################

Shell Scripting Exercises

Shell common system Variable resolution: $ $ The name of the current script $n the nth parameter of the current script, n=1,2,... 9$* all parameters of the current script (excluding the program itself) $# the number of arguments to the current

Linux Shell Combat (IPCS tools)

#!/bin/Bashwhoami=' WhoAmI 'if[$#-lt"1"] then echo'[program name] [Action Object]'Exit0fi# requires two parameters, parameter one: start line, parameter two: End line, parameter three: Operation Object function seddata{ forNumxinch' IPCS | Sed-n ${1}

Shell Note: Get the native IP address

#!/bin/bash#2.sh# Write a shell script to get the network address of this machine. #比如: The IP address of this machine is: 192.168.100.2/255.255.255.0, then its network address is 192.168.100.1/255.255.255.0# Note: Bcast with the previous IP address

How to pass an array to awk inside a Linux shell script for processing

Some time ago and several colleagues discussed a question: How does a shell script pass an array inside awk for processing?No method was found at that time. The previous two days in the QQ group to discuss awk, inadvertently chat about this topic.

Peanut Shell Use Tutorial

Inadvertently see the router inside there is a dynamic domain name, and later on-line a check that it is possible to establish a personal website, and then allow other users on the network to access their own servers, such as their own establishment

Total Pages: 541 1 .... 304 305 306 307 308 .... 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.