AIX System Shell Programming Basics

Source: Internet
Author: User

What is a shell?

The Shell is an interface between the operating system and the user that interprets the commands the user emits, launches the application, and manages the user data with system features. The shell can run multiple processes simultaneously in the foreground or in the background under the user's interactive control, and the shell is also an effective programming language.

1. Wildcard characters

(1) *: multiple arbitrary characters

$ ls

Info Newdir test.file testfile

mbox newtest.file Test1.file Wangyi

$ ls *.*

Newtest.file Test.file Test1.file

(2)?: Single arbitrary character

$ ls????. *

Test.file

(3) []: a single character between []

$ ls [mt]*

Mbox Test.file Test1.file

(4) [-]: a single character in the [-] range

$ ls [m-w]*

mbox newtest.file test.file test1.file testfile

Newdir:

Wangyi:

(5)!: not one or some characters

$ ls [!t]*

Mbox Newtest.file

Info

Notes TMP

Newdir:

Wangyi:

Test.file

2. Standard input and output

In the AIX standard state, the input comes from the keyboard, the output is to the screen, and the error message is displayed on the screen.

REDIRECT Symbol system variable name

Standard input < (<<) 0

Standard output > (>>) 1

Standard error Output 2> (2>>) 2

3/redirect

In AIX environments, standard input, output, and error messages can be redirected, allowing users to get input from places other than the keyboard (such as files, serial ports, etc.) and send the input and error messages to other places (such as files, etc.) outside the screen.

Input redirection

$ command < filename

$ Mail Xumin < Test.file

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/unix/

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.