Automated installation of shell scripts Universal binary format mariadb

#!/bin/Bashdatadir="/mydata/data"sqlconf=/etc/Mysqlinstalldir=/usr/local/mysql# about the installation package you can go to the official website to download, pay attention to download the common binary format, and then put on the FTP server can be #

SHELL Variable Summary

Positional variables$ A Gets the file name of the current user script contains the path$n gets the nth parameter of the currently executing shell script if n is greater than 9 in curly braces ${10}$# gets the number of arguments for the currently

A small question about variables with double quotes when grep in a shell script

When writing a shell script today, one of the actions is to use the grep command to search for the specified content in a file. Specifies that the content is stored in a file, using a variable to get the contents of the file, and then uploading to

Every time you read a specified directory, a specified number of file shell scripts

#!/bin/shpath=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbinlang=zh_cn. gb18030export path langanalyzer_home=$ (cd  "$ (dirname ") ";  pwd) cd  $ANALYZER _ Homedeclare -a filearrecho $1 ", " $2function listdirfile ()  {   #fileArr = ()

Automatically implement Hadoop decommission shell script version

IntroducedBefore I had a blog post that describes how to automate Hadoop decommission with Ansible playbook, this article describes using shell scripting.The scripts are placed on the springboard machine, and the remote server calls the local script

Linux shell structure with source command

Linux shell& Environment variableswhen you log on to the system, a user shell is started. In this shell, you can use a shell command or declare a variable, or you can create and run a shell script program. When you run a shell script, the system

Learn Shell script Diary

linux,shell2015-02-07    1. Scheduled tasks: Corntab-e writing Scheduled Tasks     CORNTAB-L viewing Scheduled tasks       Corntab-r Clear all Scheduled Tasks            If you want to clear a scheduled task, you can go to the edit page of the

Understanding fault pages by starting execution of shell processes

Loading the shell process through process 2, in detail execve, this article, the last shell program to start executing the linear address is 128MB, due to Free_page_tables, has released the 32nd-bit page directory entry. Therefore, a fault is

The meaning of special variables in the shell

Linux shell $$, $#, #!, $*, $, [email protected], $-, $0~$9 meaning$$Shell itself PID (process ID)#*All parameter lists. such as "$*" in the Case of "" ", in the form of" $ $ ... $n "output all parameters.[Email protected]All parameter lists. such

Split string in Shell

Recently the system has learned shell programming.See an example in the book, very dick. I thought about it before, but I didn't get the result.I believe that the students also guessed this example, is a line of string splitting. Students can try it

Command logging of shell script instances

input 1:[[email protected] --shiyan rec]#Catrecord1#!/bin/Bash#filename:record.SHdir=/tmp/Recread-P"Please input the session filename:"Filenamesesfile="$dir/$filename. Session"logfile="$dir/$filename. Timing.log"if[ -e $sesfile] Then Echo "$sesfile

Operator differences for Shell numeric and string comparisons

Numerical comparison:N1-eq n2 Check if N1 equals N2 n1-le n2 check N1 is less than or equal to N2N1-ge n2 Check if N1 is greater than or equal to N2 n1-lt n2 check N1 is less than N2N1-GT n2 Check if N1 is greater than N2 N1-ne N2 check N1 is not

Shell in && | | How to use

&& operators:Command1 && Command2&& the command on the Left (command 1) returns True (that is, returns 0, executed successfully) and the command (Command 2) on the right side of the,&& can be executed, in other words, "If this command succeeds &&

Linux Shell Syntax Learning

File comparison Operators-e filename true if filename exists [-e/var/log/syslog]-D filename True if filename is a directory [-d/tmp/mydir]-F filename True if filename is a regular file [-f/usr/bin/grep]-L filename True if filename is a symbolic link

Shell theory Learning (II.)

30.tee: Reads the standard input and then displays it by the standard output and stores the data in the specified fileExecute this command, test.txt if it already exists, it will be emptied, if it does not exist a new file will be created, end the

Shell traverses each line of the file

Because the use for to read in the file line, will automatically put the space and newline characters as the same delimiter, because when there are spaces in the line, the output will be very messy, so ...Cat Input.txt |while Read line> Do> Echo

Shell exits, returns a summary

Common returns in the shell are: Exit,breakm,returnExitIn fact, after each command is completed, it will return an execution state!If the execution succeeds, it returns 0If execution does not exceed, return non 0!Example application: Use the shell

Shell Learning Notes (i)

1.1) Integer calculation:(1)$ (()): for mathematical calculationsecho $ ((3+3))(2)Expr: There must be spaces on either side of the operator, if $[] is included, you do not have to consider whitespace issuesExpr 2 + 22) floating point calculation:BC

Shell Progress bar

The tput and printf functions are required to print the progress bar in the shell.# tput Row col cursor moves to row row column Col# tput cols Gets the maximum number of columns in a window# tput lines Get window max running script# echo $LINENO Get

Linux Shell determines whether files and folders exist

The shell determines whether the file, directory exists, or has permissions#!/bin/sh mypath= "/var/log/httpd/" myfile= "/var/log/httpd/access.log" #这里的-x parameter Judging $ Whether the MyPath exists and has enforceable permissions if [!-X '

Total Pages: 541 1 .... 385 386 387 388 389 .... 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.