Shell script Implementation Batch collection Love station keyword library _linux shell

Shell Batch collection Love Station keyword library, the whim of the play, not perfect, first put out, later slowly update, although the function is simple, similar tools are also many ready-made, but after all, it is their own writing tools,

Functions, function definitions, scope issues in the shell _linux shell

Speaking of function calls, I believe that we will not be unfamiliar, however, for beginners shell of me, the shell function call Way is a little let me not too accustomed to, I have gone a lot of detours, because the transfer parameters when a very

3 ways to get native IP addresses in a shell script _linux shell

Method One: Copy Code code as follows: /sbin/ifconfig-a|grep inet|grep-v 127.0.0.1|grep-v Inet6|awk ' {print $} ' |tr-d ' addr: ' Or /sbin/ifconfig|sed-n '/inet addr/s/^[^:]*:\ ([0-9.] \{7,15\}\). */\1/p ' Method Two:

How many arguments does the shell support at most? _linux Shell

In the scripting process, the input of parameters is usually involved. For example, SH 1.sh 10 20, in the execution 1.sh this script, 10 is the first parameter, 20 is the second parameter. Sometimes, there is this confusion, that is, how many

25 Useful shell Scripts Common command sharing _linux shell

ssh

1. List all directory usage and sort by size. Copy Code code as follows: Ls|xargs Du-h|sort-rn #不递归下级目录使用du-sh 2. View the file exclusion with the # switch and blank line, suitable for viewing the configuration file. Copy

Shell implementation Arithmetic Simple method _linux shell

1. Simple method Copy Code code as follows: $ b=$ ((5*5+5-3/2)) $ echo $b 29 In the Linux shell, we can use $ (()) to put an expression in parentheses to achieve the function of the operation. 2. Other methods: Using:

Nginx Log Cutting shell script _linux shell

First, the script idea The first step is to rename the log file without having to worry about renaming the log file and losing the log when Nginx is not found. Before you reopen the log file for the original name, Nginx still writes to the file you

Extract IP information from apnic script share _linux Shell

Copy Code code as follows: #!/bin/bash # Download from ApnicRm-f Delegated-apnic-latestwget http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest # IPs allocated to.grep ' apnic| cn|ipv4| ' Delegated-apnic-latest | Cut-f-d ' | ' >

VTune Automation Installation Script _linux Shell

Copy Code code as follows: #!/bin/bash #!/usr/bin/expect-f #!/usr/bin/env Bash Yum Install-y expect wget Cd/root wget http://172.16.92.99/share/tar/vtune_amplifier_xe_2013_update15.tar.gz wget http://172.16.92.99/share/tar/EVAL_L_VT__VGXB-

Use the shell to delete the files that correspond to the specified information and fields in the datasheet _linux shell

Use the MySQL shell command to read the database information, delete the specified fields, and the corresponding files of the field, the Linux platform. The preceding variable is defined as the data base configuration Copy Code code as

A concise summary of command line formats common to Linux shells _linux shell

Copy Code code as follows: #在后台执行 cmd command CMD & #命令序列. Execute multiple commands on the same lineCMD1; Cmd2 Execute multiple commands in a #在当前 shell in a set of forms{cmd1; cmd2;} Execute multiple commands in a #在子 shell in a set

How to implement sudo command without input password using pipelines _linux shell

Because of the study of PHP, I also installed a XAMPP integrated environment package under Linux. But every time you start to enter the terminal, and then point Open/opt/lampp/, then sudo to perform manager-linux-x64.run operation, to open the XAMPP

Use Plink tool in Shell to implement remote batch shutdown _linux Shell

My operating system is centos6.4. Operating system: Rhel 6.2 x86_64 Download and install the Putty software package, I downloaded the putty-0.62-1.el6.rf.x86_64.rpmDownload the address below: HTTP://RPM.PBONE.NET/INDEX.PHP3 1. Remote Host IP

Shell periodically deletes files before the specified time _linux shell

Recently the World Cup has come, has been busy between work and the World Cup, there is no time to manage my blog, today can only be the whole simple small shell to everyone. The company asked to delete one months before the backup file, so that the

The shell script implements monitoring swap space usage and viewing processes that occupy swap _linux shell

Copy Code code as follows: #!/bin/bash Echo-e ' Date +%y%m%d%h%m ' Echo-e "Pid\t\tswap\t\tproc_name" # Take out all directories in the/proc directory (the process name is the number is the process, others, such as sys,net, etc. store

Nested execution expect command instance _linux shell in shell

Always want to write expect action in the Bash script, so I do not have to write two scripts to execute, and made a little achievement in the afternoon finally, to show you. System: CentOS 5.x 1. Install expect first Copy Code code as

The shell script realizes the hard disk space and the table space usage statistics and the mail informs the _linux shell

Copy Code code as follows: #/bin/bash #该脚本用于统计硬盘空间和表空间的使用情况, and Mail out #初始化环境变量 Source/home/oracle/.bash_profile #获得本机ip ip= '/sbin/ifconfig eth0 | grep bcast | Cut-d:-F 2 | Cut-d ""-F 1 ' #切换到本脚本目录 cd/home/oracle/shell/

Implement shell script sharing _linux shell for freeing CentOS system memory

These days found that CentOS system memory has been up, even if the Apache and MySQL closed, memory is not released, you can use the following script to free memory:Script content: Copy Code code as follows: #! /bin/bash # Cache

Shell script to determine if the Apache process exists _linux shell

Write a script to check whether the Apache process exists, if it does not exist, the display does not exist, if it exists, display the number of processes, when not equal to 10, notify the administrator in red font, and ask the administrator whether

Command line A new method of adding an account number (Shell.users) _dos/bat

But add the user, this one shell.users is enough. This may also be a new method of adding a user, possibly with the deletion of Net.exe and no ADSI. The code is as follows: Js: Copy Code code as follows: var o=new activexobject

Total Pages: 541 1 .... 456 457 458 459 460 .... 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.