Here's what bash is about, including Bash's color code, Bash's four-class files, how variables are handled in bash, array variables, the shell's procedural programming language, and some simple scripting examples.One, bash color display rules (color
1. What is shell?
In fact, I have heard of shell before I came into contact with Linux. At that time, I was talking about shell programming and I knew nothing about it. But surprisingly, I remember this term when my memory is really bad. Okay,
Xi. functionsThe shell function is defined by the description of the shell grammar above and holds a series of commands waiting to be executed later. When the shell function name is used as a simple command name, a series of commands associated with
Bash 2.x provides the ability to create one-dimensional arrays.
There are several ways to create, using the built-in command declare-a or direct array elements to assign values.
When assigning a value to an array, if you do not specify a
Original article: Python scripts as a replacement for Bash utility scripts
From: http://www.oschina.net/translate/python-scripts-replacement-bash-utility-scripts
Translator: enixyu,Showme,Onion noodles
For Linux users, the reputation of command line
Today we summarize the basic concepts of bash color, configuration files, variables, arrays and related shell scripting.One. Bash's color display rulesYes, it's a color display, which is the ASCLL code for the color of the call settings, but in the
Shell Features--Linux has a variety of shells to use, the default for Bash,bash has the following key features.1. Command Memory AbilityPress the up and down keys on the command line to find a pre/Post input command. These commands are recorded in ~/
Bash Basics
About commands and command types
Use the hash table for the command Bash to accelerate the next search. To add a frequently used command, use the hash cmdBash executes commands with the same name in the path in the following sequence:
I've seen a few books on Shell programming and Linux commands, and this one is particularly impressive, though it's still an introductory book, but I think it's a little bit more detailed and broader than I've ever seen before. Today just read, but
1. Character truncation:If the character truncation is a generic path, you can use both the basename and dirname tools:BaseName can truncate a filename from a file path
For example:
Copy Code code as follows:
$
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.