Shell Getting Started first lesson

Source: Internet
Author: User
Tags echo command

The shell is a program written in C language.

Several common Shell:bash, SH, csh, ksh, etc.

Bash is the default standard shell for Linux and is fully compatible with SH

SH is the default standard shell for UNIX

Ash is the smallest resource-intensive shell in Linux and contains only 24 commands

CSH is a larger kernel of Linux, with a total of 52 commands. The shell is actually a shell that points to/bin/tcsh, which means that csh is actually tcsh

Ksh a total of 42 internal commands. The biggest advantage of the shell is that it is almost completely compatible with the ksh of commercial distributions, so you can try out commercial version performance without having to pay for a commercial version.

First shell script

First, you need a linux/unix environment, if there is no environment, you can also install Cygwin on Windows, after the successful installation can open Cygwin64 Terminal, you can start to write shell script. Type VI firstshell.sh, enter the following text to save the exit (: Wq)

1 #!/bin/bash2echo"Hello world! "

, execute sh./firstshell.sh, Output Hello world!

or enter echo "Hello world!" directly in the terminal, and you can also get Hello world! The result.

#!/bin/bash's explanation:

"#!" is a contract tag that tells the system what interpreter the script needs to execute, that is, which shell to use. the echo command is used to output text to a window .

Shell Getting Started first lesson

Related Article

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.