-B Returns True when file exists and is a block file
-C Returns True when file exists and is a character file
-D returns True when pathname exists and is a directory
-E Returns True when pathname specified file or directory exists
-F Returns True
It's nice to install fish shell today and install oh-my fish.But it is still a preliminary attempt and more features are not known. Install Fish
sudo apt install fishSet as Default shell
Chsh-s/usr/bin/fish
If you want to switch back to bash,
Shell Programming
1. Briefly
The format for writing shell scripts using the vi text Editor is fixed, as follows:
#!/bin/bash
#comments
The symbol in the first line #! tells the system that the program that is specified by the following path
The I-III section deals only with bash ...
For others, see section IV ... I: The use of obase, IBase and BC: IBase is the input of numbers, and obase is the output of the number of the system. Well remember, I am input,o is output.Note that the F
Feature Description: change the group to which the file or directory belongs.
Syntax Description:chgrp [-cfhrv][--help][--version][owned group] [file or directory ...] or chgrp [-cfhrv][--help] [--reference =][--version][file or directory ...]
1. Use shell script get_file_stat.sh statistics The number of directories in the bin directory executable file number, text file number
#!/bin/bashCd/binDir= ' ls-l |grep "^d" | Wc-l 'Exefile= ' Find/bin-perm +111| Wc-l 'Txt_file= ' Find/bin-name "*
Background: Work on a variety of online machine landing scripts, and some need to log into the board before landing on the machine, and some dynamic password, each input is very troublesome, the use of automated landing scripts to manage too
HBase Tutorial (ii) HBase database Shell command
1 Hbase-shell Command
HBase is a distributed, column-oriented open source database, HBase also provides the shell command of the database to add, delete, change, check the basic operations, such as
1.shell-sortHill sort (Shell sort) is a sort of insertion. is for the improvement of the direct insertion sort algorithm. The method is also called narrowing the incremental order, due to DL. The shell was named after it was introduced in 1959.
We
Optimized content includes kernel (commented out at the end of the article, see Personal needs) SSH time sync yum source#!/bin/bash#update Time 20180824#version 1.1.0Echo-e "\033[31m------------------------------Author name is Hefangyaonie-----------
The test command is commonly used to check whether certain conditions are true.Numerical test-EQ: Detects whether two numbers are equal, equal returns True-ne: Detects whether two numbers are equal, not equal returns True-GT: Detects if the left
One$BASH The path of the Bash 's binary program file Two$BASH_ENVThis environment variable will point to a bash startup file that will be read when a script is called.Three$BASH_SUBSHELLThis variable is used to indicate the level of the child
Depending on the Web log or the number of network connections, monitoring when an IP concurrent connection number or a short time PV reached 100, that is, call the firewall command to seal off the corresponding IP, monitoring frequency every 3
Shell Scripting Fundamentals for Programming Basics程序:指令+数据 程序: 算法+数据结构数据:是程序的核心数据结构:数据在计算机中的类型和组织方式算法: 处理数据的方式程序编程风格:过程式 :以指令为中心,数据服务于指令对象式 : 以数据为中心,指定服务于数据shell程序: 提供了编程能力,解释执行How the program is executed计算机:运行二进制指令编程语言:人与计算机之间交互的语言低级编程语言:机器:二进制的0和1
1:test variable-get 80 to determine whether it is greater than [] =test2: Use the regular expression to use [[]]3: [[]] = = Same, string do not add "" to this wildcard character=~ match, string do not add "", support extended regular
1. Shell ConceptThe shell is a program written in C, which is a bridge for users to use LinuxThe shell is both a command voice and a programming voiceA shell is an application that provides an interface through which users access the operating
1, write script/root/bin/systeminfo.sh, display the current host system information, including hostname, IPV4 address, operating system version, kernel version, CPU model, memory size, hard disk size2, scripting/root/bin/backup.sh, can be
Definition of 1.1shell1. Stacking of Commands2. A file consisting of specific syntax and specific commandsExecute script commandbash test.sh 不需要添加执行权限,使用解释器直接解释sh tesh.sh./tesh.sh 相对路径,需要添加执行权限1.2shell Script Base---VariablesVariable: A
Shell annotationsUse # as the comment symbolThere are no multiple lines of comments in the shell, only one line plus a # numberString manipulation1. Stitching strings 2. Get the string lengthString= "KHJF"echo ${#string}3. Extracting
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.