A simple calculator implemented with a shell

#!/bin/bash#echo "1.$12.$23.$3"If ["$" = "+"]ThenRes= ' expr $ + $ 'echo ">>the result is: $RES"elif ["$" = "-"]ThenRes= ' expr $-$ 'echo ">>the result is: $RES" #这里说明下, using "x" instead of "*" #是因为在命令行输入 *,shell parsing problem, #* cannot be

Use expect here Document in shell

When you use a shell to write a program, you sometimes have to confront the problem of interaction--unfortunately, the shell can't automatically complete the interaction. If the interactive content is many, it is convenient to apply expect script

"Linux" shell Linux/unix under the shell shortcut operation large set __linux

Sometimes we need to repeat the previous commands in Bash. You can certainly use the UP ARROW keys to view the commands you've run before, but this article describes some of the better ways, such as!!,!a,!number,!-number,!$,ctrl+r shortcuts. This

HBase Common shell commands

1, view namespace Hbase>describe_namespace ' Ai_ns '2, List all namespace Hbase>list_namespace, 3, Create a table under namespace Hbase>create ' ai_ns:testtable ', ' FM1 ' the management of the table 1 See what tables are available

Shell input and output redirection __linux under Linux

on the shell: 0 indicates standard input, input data from the terminal, generally refers to the keyboard 1 indicates the standard output, the data displays to the terminal, generally refers to the screen 2 indicates standard error output, Error

Linux Shell Learning __linux

Linux Common Commands LS-F: Catalog will show/ [Root@milab ~]# ls-ifl total dosage 69199780-rw-------. 1 root root 1496 June 8 2016 anaconda-ks.cfg 77471938 Dr Wxr-xr-x. 2 root 6 September 21:49 svntest/ 74325841-rw-r--r--. 1 root root 7

Linux executes commands independently with output, CGI calls shell script, no output __linux

Call volatility in the shell script, the volatility call is normal when the local test, but when the CGI program calls the shell script, there is no result output ... Why There may be two reasons for the analysis: (1) Permission issues (2) Python

Linux shell Remote execution command __linux

Often to deploy multiple servers above the application, if a machine's login too cumbersome. All just think about writing a script to deploy different servers Prerequisites: Configuring SSH Login Free If not, please join me in another article http://

Linux Shell script Programming--cut command __HTML5

Cut-and The Cut command extracts text columns from a text file or text stream. Cut syntax [root@www ~]# cut-d ' delimited character '-f fields The PATH variable is as follows [Root@www ~]# echo $PATH /bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/

Batch execution of the same command shell script on a Linux cluster __linux

Execute the same command on multiple machines on a cluster because of actual development needs. For example, execute a specified script, delete files in the same directory (this is prudent ~ ~) and so on, the members of the group developed a ALLSCP (

Linux Shell programming __ block Chain

Shell Programming 1. Briefly The format for writing shell scripts using the vi text Editor is fixed, as follows: #!/bin/bash #comments The symbol in the first line #! tells the system that the program that is specified by the following path

QuickStart Shell Scripting (ii)

Last time I wrote the shell, I found that VI and VIM are different: Vim is the upgrade version of VI, it is not only compatible with all VI directives, but also some new features in it. Vim is much more useful than VI. This time the last content,

tomcat+ Peanut Shell Configuration Web project to achieve extranet access __web

The first step: Download Tomcat 7.0.27 Click the Open link, this is a no-install compression package, decompression can be used. The second step: Apply for dynamic domain name, you can go here to register a peanut shell account, registered well

operator of the Shell

an arithmetic operator: +-*/% (take more) * * (Power) 1.1 expr evaluates an expression value Expr expression (expr cannot calculate a power operation) Example: #。 /bin/bash #计算2和100的差, i.e.-98 result= ' Expr 2-100 ' echo "$result" #计算2和100的和, which

HBASE Common shell commands, additions and deletions to search

First give the data of this operation Create ' student ', ' info ', ' address ' put ' student ', ' 1 ', ' info:age ', ' Put ' student ', ' 1 ', ' info:name ', ' Wang ' put ' student ', ' 1 ', ' info:class ', ' 1 ' put ' student ', ' 1 ', '

Hill sort (Shell sort)

This sort looks more difficult than bubbling selection, inserting, and logically complicated. Intuitively, I know this is not simple, a little afraid. There is no way to give yourself a hint of psychology, be sure to read the 8 basic sorting

Shell Scripting Learning Notes-variable usage and input and output

1. Definition of variables 1.1 Variable names can consist of letters, numbers, underscores, but numbers cannot be the first character of a variable name. 1.2 Define the value of the variable by assigning the symbol "=", e.g: Myname= ' Test ', String

Shell Process Control

Unlike Java, PHP and other languages, SH's process control is not empty, such as (the following is the PHP Process Control notation):PHP if (Isset ($_get["q"]) { search (q);} Else { // don't do anything }You can't write this in Sh/bash, and

Linux Shell Script Instance----------

Linux Shell Basics Terminal printing #!/bin/bash#The printf of Linux termnal,Include "echo,printf"#author by woon echo "The shell\`s name is $0"#examples of echo,printf#默认打印。输出换行echo "Hello World!" echo ‘Hello World!‘#echo -n参数接受不换行输出echo -n

Sublime calling the shell

When you do Flask Web development under Linux, you begin to fully learn to use the sublime editor.Because of the need to shell execute the command under python run.py runserver , it is necessary to be able to invoke the shell execution of the

Total Pages: 541 1 .... 369 370 371 372 373 .... 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.