Operation of shell scripts, etc.

1, command substitution: 'Inverted single quotes, also called heavy notes. On the keyboard and the ~ key together of the key yo, do not knock into single quotation marks.AAfter using ", the shell first replaces the date command enclosed in the

Change the prompt color in the shell terminal

The cue color in the shell terminal is determined by the PS1 in the environment variable, so change the PS1.1> Temporary changes[[Email protected]~]# echo $PS 1 [\[email protected]\h\w]\$ [email protected]~]# ps1= ' \[\033[31m\][\[email prote

The understanding of shell and kernel

The Shell's English interpretation is the shell, echoing with the kernel kernel noun, one outside, one shell and one core. The kernel is like the Bank of Switzerland's treasury, storing the customer's gold and many other (hardware) assets,

Common variables, end states, and test expressions under the shell in POSIX

In the open-source Unix system usually for the convenience of management will be a lot of use of shell script, and in peacetime writing script when the fast and effective is a lot of built-in variables can be used, here is a simple summary of the

Learn the shell happily

/bin/bash is the default shell for Linuxsetting, reading, and deleting variablesExample: Name=zhangsan echo $name unset nameYou can view the value of the Echo $HOME $PATH of the environment variableVariable setting, there can be no spaces on both

Bash Shell Utility shortcut keys

ctrl-d corresponds to the DEL key, which is the character at which the cursor is deleted CTRL-E equivalent to end key, moving cursor to end of bank Ctrl-k is used to delete all characters from the beginning of the cursor to the end Ctrl-l clear

Shell for Loop

Shell for LoopThe general format for A for loop is:For variable in listDoCommand1Command2...CommandNDoneA list is a sequence of values (numbers, strings, and so on), each separated by a space. Each time the loop is passed, the next value in the list

Hadoop (v): Shell command

HDFs DFS -cat URI: Viewing the contents of a file HDFs dfs-cat HDFs Dfs-cat hdfs://mycluster/user/root/rcc1 HDFs dfs-cat file:///usr/hdp/2.4.2.0-258/hadoop/bin/RCC -ls : Check

Shell-related commands

What is 1.shell?From the user perspective: The shell is a bridge between users and LinuxFrom the programmer's Point of view: The shell itself is a program written in C languageThe shell acts as a translator, translating the commands entered by the

Application of test statements in the shell

The introduction of test statements in Linux can help us improve the efficiency of our tools and reduce the intensity of our work. So this article mainly introduces the introduction and usage of the test statement in the shell script of Linux.I.

Shell ${} usage

Suppose we define a variable as:File=/dir1/dir2/dir3/my.file.txtWe can replace each other with ${} to get different values:${file#*/}: Take out the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Take out the last/and left string:

Shell Scripting Learning Summary--file descriptors and redirects

The file descriptor is an integer associated with the input and output of the file, which is used to track open files, and the file descriptor 0,1,2 is reserved by the system.0--stdin (standard input)1--stdout (standard output)2--stderr (standard

The difference between source/fork/exec in the shell

Tag: exec source ForkFork is a system call to Linux that creates a child process that is a copy of the parent process, obtains a certain resource allocation from the parent process, and inherits the environment of the parent process. The only

The shell script implements LLD monitoring

To implement Zabbix LLD monitoring, you typically need two scripts, a custom discovery check script, and output in JSON format, and the other is the script to get the valus of the monitoring item.The custom discovery checks script output results in

13th Chapter Learning Shell Script

First Script[email protected] script]# cat-N sh01.sh1#!/bin/Bash2#Program:3#This program Shows"Hello world!" inchyour screen. 4Path=/usr/local/java/jdk1.8.0_91/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin:~/bin5export

Automatically upgrade OpenSSH shell scripts

Because of the management of more than 200 Linux servers, a person engaged in the security of so many machines more tired, so after learning the shell script decisive write some common scripts to do some routine maintenance, this article OpenSSH

Variables in shell programming

A variable is a quantity whose value can vary; In essence, a variable name is a memory space for storing data;The variables have local variables and environment variables;A shell variable is a weakly typed variable that does not need to specify its

Shell nested expect for loop nesting expect implementing file remote replication

Recently in the Zabbix, the company has six new servers. When the Zabbix client is deployed, the baby is really angry. Grandpa's always so repetitive work is also not AH. But as a war five slag, what else can be mixed with rice? Think of last year

Shell character (string) processing command

1.find find files that match your search criteriaFind Pathname-options [-print-exec-ok ...]--options:-perm: File lookup permission, plus number-type: File type, plus f: File D: Directory L: Symbolic link file-group: Find files belonging to group

Basic procedural exercises under the shell

1. Simple progress bar Program650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/82/F2/wKiom1dmiCfizPKcAABUqdm5Mxw224.png-wh_500x0-wm_3 -wmp_4-s_2159390602.png "title=" bar. png "alt=" wkiom1dmicfizpkcaabuqdm5mxw224.png-wh_50 "/>Lable array

Total Pages: 541 1 .... 266 267 268 269 270 .... 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.