Awk calls the shell and passes the variable to the shell's variable pass between awk and the shell

Invoking awk in a shell script is very natural and simple, and if you need to invoke the shell script/command, you need to use the system () function, which is written as System ("sh my.sh" $var) if you need to pass the variable to the called Shell.

FreeBSD Linux Replace the default Shell method summary

Method start Check out the current shell The code is as follows Copy Code [Phpbird@host3 ~]$ Echo $SHELL/usr/local/bin/bash Of course, this is modified.Modify the default shell to modify the/etc/passwd

Linux shell Script monitoring site 80 port and site is normal

Monitoring website 80 Ports Many times we do not know whether the site 80 port is normal, of course, my previous Shell monitoring site status (continued) This article can also monitor the site, here is just to provide you with another way to

Shell Analysis Nginx Log in Linux to find blocked IP

In the day-to-day operation of the flow of traffic will find the phenomenon of sudden increase or increase in server load and so on, in order to find out why, need to use the Nginx limit module to access IP restrictions, and then can analyze the log.

Several cases of sqlplus and shell passing value to each other

Original works, allow reprint, please be sure to use hyperlinks in the form of the original source of the article, author information and this statement. Otherwise, the legal liability will be investigated. http://nbmonster.blog.51cto.com/1977736/665

9th. Shell Basics (3) _bash variables

4. Bash 's variables4.1 user-defined variables4.1.1 What is a variableA variable is a memory unit of a computer where the stored value can be changed. When a shell script needs to save some information, such as a file name or a number, it is stored

Shell script, awk uses NF to calculate the number of lines of text displayed.

Explain:1.awk ' nf{a++;p rint a,$0;next}1 ' file4First of all, the existence of the value of NF, the first row of the second row of the third row of the fourth row is present, the output after execution, after the output hit next, the end of the

shell-writing a distribution system

Distribution system: Used for multiple server code or software simultaneous distribution of execution1.install–y Expect installation expect program for automatic login to remote server2. Write Automatic Login ScriptVim Hu.expect#! /usr/bin/expectSet

Shell Note 3

Cal Command: Date display Cat/proc/meminfo: Memory usage Query Free command: Memory detail Query Arch command: CPU architecture displayDisplays the architecture of the current system, for example:#archx86_64 CAT/PROC/CPUINFO:CPU

Shell Note 8

A function is the name of a command or a set of commands. Functions can make the program modular, thus improving efficiency. The shell stores functions in memory rather than in disk files, so accessing the function is much faster than accessing

Shell gets CPU usage

The shell script obtains a method for each CPU usage of the host.#!/bin/Bashinterval=3Cpu_num=`Cat/proc/Stat|grepcpu[0-9] -C ' Start_idle=() Start_total=() cpu_rate=() Cpu_rate_file=./`hostname' _cpu_rate.csvif[-F ${cpu_rate_file}]; Then

[Original] Linux Classroom-Study notes-course 3. Linux directory structure introduction and kernel and shell analysis

I. Description of the Catalogue1.1 Bin General user, executable system built-in commands1.2 Sbin system administrator, executable system built-in commands1.3 Boot boot file directory, start the relevant files are saved in this1.4 Dev Device

The issue of entering a password in the shell script to resolve the SCP command

Use the key file. This assumes that host a (192.168.100.3) is used to obtain a file for Host B (192.168.100.4). Execute the following command on host A to generate the pairing key: ssh-keygen-t RSA encounters a prompt to enter by default, and the

Shell Basics use Shell to detect whether a directory exists, there is no prompt for users to create a directory

#!/bin/bashif [ -e $1 ]        then                 echo  "Directory exists"          else        {                          echo  "Directory does not exist, whether create 1 is 2 No"                          read -p  " Please enter 1 or 2: " mulu   

Shell monitoring Cpu,memory,load Average

The shell monitors cpu,memory,load average, logs to log, and notifies the administrator when the load is under pressure.Implementation principle:1. Get the value of Cpu,memory,load average2. Determine if the value exceeds the custom range, for

Shell Script basic Application (iii) Special shell variables

The operation of a numeric variable: The numerical operation of the shell variable is mostly used in the process control of the script, in the shell environment, only a simple integer operation, does not support the fractional operation,

Shell script return, ECHO, printf

Ehco and returnreturn   Returned is the status code, function end Return does not return function return value You can return the function return value with echo in front, return the specified function exit status code Echo returns the

Explanation of the meaning of shell variable $#,$@,$0,$1,$2 in Linux

The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$ The PID of the shell itself (ProcessID)$! PID of the Shell's last running background process$?End code of the last Run command (return value)$- 

Talking about Shell-eval

First, the basic use of EvalEval will scan the back of the CmdLine two times, if after the first scan, cmdline is a normal command, then execute this command;If the cmdline contains an indirect reference to a variable, the semantics of the indirect

DNS Follow-up (DNS cluster, "Peanut shell", "Remote IP password Change DNS")

DNS Cluster ( multiple servers synchronize one primary DNS information, easing the pressure on the primary DNS )Configure the secondary DNF server (so that it can synchronize primary DNS, sharing the pressure of the primary DNS :)Modifying a

Total Pages: 541 1 .... 145 146 147 148 149 .... 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.