Simple example of a shell script

1. Analog Linnux Login Shell #/bin/bashEcho-n "Login:"Read nameEcho-n "Password:"Read passwdif [$name = "CHT"-a $passwd = "abc"];thenecho "The host and password is right!"else echo "Input is error!"Fi 2. Compare the size of two

Shell 10 Process Control

If is judged if#shell#!/bin/sha=5if [[ $a > 3 ]];then echo "$a>3"fi#写成一行if [[ $a 3";fi5>35>3If Else#shell#!/bin/sha=5if [[ $a > 8 ]];then echo "$a>8"else echo "$a5If elif Else#shell#!/bin/sha=5if [[ $a > 5 ]];then echo "$a>5"elif [ $a

Shell Programming Combat

Why you should learn shell programmingShell scripting language is an important tool to implement LINUX/UNIX system management and automation operations, and the core of Linux system and basic application software mostly involve the content of shell

Shell Programming-test Command (VI)

The test command is commonly used to check whether certain conditions are true.Numerical test-EQ: Detects whether two numbers are equal, equal returns True-ne: Detects whether two numbers are equal, not equal returns True-GT: Detects if the left

Operation of the Shell two ways

Interactive ShellPackage Mainimport ("Golang.org/x/crypto/ssh" "Log" "OS" "FMT"Func Main () {CE:= Func (err error, MSGstring) { ifErr! =Nil {log. Fatalf ("%s Error:%v", MSG, err)} } client, err:= ssh. Dial ("TCP","192.168.154.131:22",

"Shell Scripting Learning-2"

#!/bin/bash-#echo do what exetuate this project \nprintf "Please input your passwd" Stty-echoread Pass 1.txt | Sort > 2.txt#echo "1 6 8 1 4 9" > 1.txt | Sort 1.txt | Tail 1.txt #cat/dev/null#!/bin/bash#cat/bin/liupeng | grep a | WC #$1#read $x

Shell Script (iii)

One? Using the FOR Loop statement(1) Structure of the FOR statement: When using a For loop statement, you need to specify a list of possible values for a variable, repeating the same sequence of commands for each different value until the value of

Custom logging to a file in a shell script

Custom log functions and pre-variables# Adirname-return Absolute dirname of given fileadirname () {odir= ' pwd '; CD ' dirname $ '; pwd; CD "${odir}";} Mynam= ' basename ' $ "' mydir= ' Adirname" $ "' myhome= '/home/shell/script" mylog_path=

Crontab the reason that the shell script failed to execute at timed time

There is a period of time without crontab scheduled to perform tasks, this time to take advantage of the project implementation of the opportunity to further analyze the Crontab timing task settings encountered some difficult problems.Crontab-l View

Usage and differences of Shell and ShellExecute functions in VB

Write a VBProgramTo integrate the original programs of VB and VC. Is to use shell functions. The results show that the VC program can be properly displayed, but the VB program is minimized when it is written. I checked the following

How to change Shell

You can change the shell in three ways: 1. Change the default shell for all later logon sessions Enter the command CHSH-L to view the available shell and its path of the current system. After entering CHSH, the system prompts you to enter the

Seeking for OEP from shell-two memory breakpoint Methods

0x00 Preface The first thing for shelling is to find the OEP (oringinal entry point). Because of shelling, when the PE file is loaded into OD or other debugging software, it is usually the entry address of the shell program. So the first step of

Batch pack IOS jailbreak packages by Shell

Often, a software IOS jailbreak package requires many channels. I used to modify the channel number once and re-package it. However, as more and more channel numbers become daunting, you can only find one automatic packaging statement. You can

Shell and export commands

References:Http://baike.baidu.com/view/2959759.htmHttp://blog.sina.com.cn/s/blog_62945c360100ffvk.htmlHttp://www.51testing.com /? 44957/action_viewspace_itemid_90758.html Shell and export commands Export commandFunction Description: sets or displays

Shell graphical progress bar

In shell script writing applications, graphical interfaces are sometimes required. For example, the default CP copy file mode is silent, and the copy progress and percentage cannot be seen. The dialog tool provides a graphical interface for shell.

Chown of shell commands

root@bt:~/test# chown --helpUsage: chown [OPTION]... [OWNER][:[GROUP]] FILE... or: chown [OPTION]... --reference=RFILE FILE...Change the owner and/or group of each FILE to OWNER and/or GROUP.With --reference, change the owner and group of each

Shell Source command

Http://www.xxlinux.com/linux/article/development/shell/2006-09-22/4499.htmlHttp://www.diybl.com/course/6_system/linux/Linuxjs/20071027/80454.htmlHttp://linux.chinaunix.net/techdoc/system/2008/09/04/1030374.shtmlBoth exec and source are Bash Internal

Use the shell for loop command in Windows

This article is great for people who have been using bash in Linux for a long time. The for command has powerful functions! Self, http://hi.bccn.net/space-21499-do-blog-id-13524.html For allows some commands that do not support wildcards to operate

Run shell scripts in Java

By using the runtime.exe cute method, we can run the Linux Shell script in a Java program or execute other programs. Referring to this article on the Internet: http://lee79.javaeye.com/blog/418549 (thanks), I rearranged the code.The

Shell brute-force single-step analysis (5) cracking tutorial

[Cracked by] layper[Author mailbox] layper2002@yahoo.com.cn[Author's homepage] www.sy135.com[Tools] peid, OD,[Cracking platform] Win9x/NT/2000/XP[Software name] single-step Analysis of Shell and shell chaos (5)[Statement of cracking] I am a cainiao.

Total Pages: 541 1 .... 340 341 342 343 344 .... 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.