A method of translating shell scripts into binary execution files

Because of the need for plaintext to display passwords in the script, the idea is to encapsulate the already edited shell script into a binary executable file.Using the tool SHCOfficial Download site: http://www.datsi.fi.upm.es/~frosal/Use the

Shell Script Installation Nfs-server

#!/bin/bash: Program:NFS Server installbr/>[email protected]20171129 v1.020171130 v1.1 Modify the following:1. Cancel the grep "style" file &>/dev/null if [$?-ne 0];then Usage, modify to if grep-q "style" file; then method2, all changed to function,

The Advanced shell script

I. Condition selection, judgment (if, case)1.1 If statement usage and examplesWhen we encounter the need to judge in the script, we can use the IF statement to implement. The specific syntax is as follows:Single Branchif judgment condition;

Shell scripts to install the NTP Server service

############################# #Deploy NTP server ########################Echo "start deploy NTP server" Yum Install-y NTPif[!-f/var/log/ntpd.log]; Then Touch/var/log/Ntpd.logfi Chownntp:ntp/var/log/Ntpd.logCat$basepath/package/ntp.conf

Have finished the shell, write a little script to show you

In Linux has been learning for one months, today to write a small script, wrote three different, although simple, but you can see, I wrote the script is ping3 times to see if the host is alive!The first one is ~ ~ for~~ loop because I knocked it

Linux Learning Notes (25) Shell special symbols, Sort_wc_uniq, tee_tr_split

one, special characters 1.Any character of ' * '‘? ' Any one character' # ' comment characters' \ ' de-semantic characters' | ' Pipe characterMost of them have been used before, for the caret ' \ 'Examples of the use of the caret2. Several

Shell Exercises (vii)

Exercise 1:Statistics Log size If we need to execute the script you wrote every hour. In the script to implement such a function, when the time is 0 and 12 points, you need to empty the file under directory/data/log/, notice can only empty the

Shell exercises (eight)

Exercise 1: Monitoring disk usageRequirements: Write a shell script that detects all disk partition usage and inode usage and logs to a log file named after today's date, and notifies you when a partition capacity is found or the Inode usage is

Shell Scripting Exercises

Title requirements:Write a script to enter personal information/root/bin/information.sh, the requirements are as follows:1. Prompt the user to enter username (need to check the name of the character, the user name can not be blurred contains any of

Shell programming Exercise-Copy the specified file (keep the directory structure of the file)

1. PurposeCopy all files larger than 1M (customizable) in the/root directory to the/tmp/bakdir (customizable) directory, and you need to keep the directory structure.For example, the/root/reed.file file size is 12M and will be copied to

Logical judgment in the shell

1.if judgment① simple judgment, if the condition is met, return OK#!/bin/basha=5if [$a-gt 3]then echo "OK" fi[[email protected] test_shell]#./test.shok② two conditions, you can use elif and else#!/bin/basha=5if [$a-lt 3]then echo "Common symbols in

Write a shell script and execute it once

First the CD into a directoryTauch tset.sh//Create a new test.sh fileVim test.sh Edit ScriptI insert#!/bin/bashDataPress the ESC keyThen press CTRL +:Wq + EnterLs-l test.sh//view file permissions-rw-rw-r--1 Elasticsearch elasticsearch 18 February 8 1

Tai Hang record-shell script delete operation

BackgroundJenkins executes the shell command, which references some Jenkins variables, such as ${workspace}, because each execution of Jenkins is slow, so I want to copy the script to local debugging, directly copied the script to execute, the

Shell programming------variables, assignments, and operations

1. Variable assignment:NAME=LBG equals sign cannot have spaces name= "Lebron James" variable values have spaces in double quotes Echo ${name} with ${} More insurance shopt-s-O Nou Nset setting "Declare and use first"2. Cancel the variable:unset

Shell Programming Exercises

Topic One: Summation exercise:#!/bin/bashfunction Sumarray {Local sum=0Local arrayArray= (echo "[email protected]")For value in ${array[]}Dosum=$[$sum + $value]DoneEcho $sum}Wang= (1 2 3 4 5)echo "Initial data is: ${wang[]}"Kai=echo ${wang[*]}result=

Day9-1 Shell Basics

The shell is a command interpreter that provides user and machine interaction before Command historyPress UP ARROW key to appear before order historyHistory View Previous commandsThe command history exists in the file. Bash_historyThe maximum

Application practice of Shell array

Definition of shell array:Method 1: The variable value is assigned to the array variable with a small extension, and each variable value is separated by a space.The syntax is as follows:array= (value1 value2 value3 .... ) #常用Method 2: Enclose the

VM in python2.7 run skier game, Shell restart issue!!!!!!

In the virtual machine Win7 system python2.7, the skier Game (code handwriting) in the parent and child is run in this Python,The following problems occur:================ restart:c:\python27\scripts\skier\skier.py ===================================

$0, $? In Shell scripts? , $! , $, $ *, $ #, $ @, Etc.

$0, $? In Shell scripts? , $! , $, $ *, $ #, $ @, Etc. $0 indicates the execution name of the program. The file name of the current script $ n indicates the nth parameter value of the program. n = 1 .. 9 $ * all parameters of this program. This

How to get started with Shell programming: how to get started with shell programming

How to get started with Shell programming: how to get started with shell programming Unlike Java, PHP, and other languages, the sh process control cannot be blank, for example: Public class Test {public static void main (String [] args) {int a = 10;

Total Pages: 541 1 .... 459 460 461 462 463 .... 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.