The Helloword of the shell

Source: Internet
Author: User

The Helloword of the shell
Cd/bin
Ls-l | Find-name SH
Ls-l | FIND-NAMD Bash

Ls-l | Grep-r sh sh is actually pointing to dash
lrwxrwxrwx 1 root root 4 2014-12-11 03:13 sh, dash
Ls-l | Grep-r Bash

CD ~
mkdir Shell

VI hello.sh
#!/bin/bash//fixed notation, equivalent to introducing
Echo ' Helloword '

Ls-l
sudo chmod u+w hello.sh//Let the owner of the file have hello.sh Execute permission
./hello.sh

Declare a temporary variable in the current window:
Hi=sniper.hi
Echo $hi

Pstree
Gnome-terminal─┬─bash───pstree
│├─bash
│├─gnome-pty-helpe
│└─2*[{gnome-terminal}]

Bash//Start a new shell subprocess, Bash command, start for subprocess, note the path difference
Pstree
Gnome-terminal─┬─bash───bash───pstree
│├─bash
│├─gnome-pty-helpe
│└─2*[{gnome-terminal}]

Go back to the previous level process exit

Problems encountered:
HELLO.SH//Such direct execution does not

hi = Sniper.hi//assignment in the shell, no spaces need to be written Hi=sniper.hi


The Helloword of the shell

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.