DAY01 Shell Script Programming

I. Shell environment and features 1.1 what is a shellInterpreter: Responsible for translating and communicating user/program instructions to the kernelInterpreter carShell carBash BMW, Mercedes, Ferrari1.1.1/etc/shellsThe content inside the file is

shell-detect if the service is running and log

Purpose: Detects whether the service is running every minute of the day, and if it is running, the name of the process being executed; if it is not running, the current time is loggedShell#!/bin/bashdate=`date

Problems with using SSH commands in a while loop under the shell

1 Description of the phenomenonThe most recent batch execution command using SSH (with key trust already done), the script reads the list of hosts in the configuration file (the content is one host IP address per line), and then executes, but every

Linux writes operational shell scripts and creates ln connections in other directories and sets boot up

The full ln command reference: http://www.runoob.com/linux/linux-comm-ln.htmlLN: Creating a Connection File-The default is to create a hard connection, like copy, but two files are synchronizedCommand: Ln./java/android/aa.txt AAA-S: Create a soft

Shell update dnspod domain name, do dynamic DNS

#!/bin/bashrecord_id= Domain=sub_domainuid=token=remote_ipcurl Https://dnsapi.cn/Record.Ddns- h ' content-type : application/x-www-form-urlencoded '- d ' domain= ' $DOMAIN ' &sub_domain= ' $SUB _domain ' &value= ' $REMOTE _ip ' &login_token= '

ubuntu16.04 How do I double-click Execute Shell file?

1, first use the sudo apt-get install dconf-editor command installation Dconf-editor, the default is not installed;2, after the installation is complete, run the Dconf-editor command to call out the window, press org->gnome->nautilus->preferences

Resolve command line execution shell script succeeds, but crontab execution fails

Actual production caseThe production room self-built PPTP client is connected to the production room by dial-up, but once the client network is accidentally disconnected and then dialed againGenerates an IP conflict, so a script is written to

"Shell scripting system monitoring-------Email alerts"

Like many of my classmates, I was confused shell programming before I learned shell programming, but I didn't know what it could do, but I felt I could use a different way to manage the system. Now I slowly understand the importance of the shell for

Functions that execute shell commands--system (), Popen ()

1, file* popen (const char* cmd,const char* type);int Pclose (file* stream);Popen () function fork () A child process that creates a pipeline for parent-child interprocess communication, which either reads from the pipe or writes to the pipe,

Note 6 compression tools, installation packages (RPM, yum, source packages), Shell.

Compressed packagingCommon Compressed FilesWindows:rar, Zip, 7zLinux:.zip,. GZ,. bz2,. XZ,. Tar,. GZ,. tar.bz2,. Tar.xzGzip Compression ToolIt compresses directly behind the file name and canCommand: The meaning of gzip-d decompressionCommand

What "2>&1" means in a Linux shell

You can often see them in a scheduled task. Examples of our company's planning tasks include:*/2 * * * * * root cd/opt/xxxx/test_s1/html/xxxx/admin; PHP index.php task Testone >/dev/null2>&1*/2 * * * * Root cd/opt/xxxx/test _s1/html/xxxx/admin; PHP

Shell Third: basic syntax

Directory one, what is shell script two, variable three, operator four, flow control five, function    first, what is shell scriptStacking OS commands into executables, executing the OS commands in the text from top to bottom, is scripting, and with

Special symbols in the shell

There are a lot of special symbols in the Linux shell, which we should pay special attention to when we write shell scripts: On the one hand, we need to know the use of these special symbols, which can achieve a multiplier effect, but on the other

Shell Echo-n md5sum How to use

#!/bin/Bashmysql='mysql-u***-p***-hws5 Account'tmp="tmp"Resultsource="Resultsource"resultdest="resultdest"Echo "Select User_id,phone_num,email from user_accounts where length (user_id) = one limit 1"|${mysql} >${tmp}sed '1d'${TMP} >${resultsource}>${

The dollar sign of the shell variable of Linux

The shell variable $# in Linux,[email protected], the meaning of $0,$1,$2 is explainedExcerpt from: Abs_guide The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the

Learning spark--use Spark-shell to run Word Count

In the Hadoop, zookeeper, hbase, spark cluster environment has set up the environment, 工欲善其事 its prerequisite, now the device has been, the next is to open up, first from Spark-shell began to uncover spark artifact veil.Spark-shell is the command

Shell regular Expressions and text-processing tools (i)

Job One: organize regular expression Blogs1, what is the regularA regular is a method of describing a character or string with a combination of special meanings (called regular expressions).Or, the regular is the rule used to describe a class of

Shell scripts to bulk operate Linux hosts:

Shell scripts to bulk operate Linux hosts:I. Introduction to the Environment:Turn on 192.168.100.150-152 (ctos1-3) and 192.168.100.100 (VSFTPD).1.SSH Login: Operate on 192.168.100.1001) Password login 192.168.100.150:SSH [email protected] #

Linux network configuration and SSH and Shell basics

Linux network configuration and SSH and Shell basicsFirst, the Linux network configuration The ifconfig command is used to configure and display network parameters for network interfaces in the Linux kernel. The NIC information configured with the

Shell interpreter, variable, string, array

1.Shell IntroductionThe 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

Total Pages: 541 1 .... 79 80 81 82 83 .... 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.