In Linux or Unix-like systems, each user and process is running in a specific environment. This environment contains variables, settings, aliases, functions, and more. Here is a brief introduction to some of the common commands in the shell environment, including examples of how each command is used, and setting your own environment at the command line to improve efficiency.
Find your current
Look at the previous section: Linux Shell Data Redirection (input redirection and output redirection) detailed analysis It is estimated that some friends are dizzy, so complex redirect. This time we'll take a look at the pipe command. Shell pipe, it can be said that the usage is much simpler.
The pipe command operator is: "|", which can only handle the correct
First, Shell introduction
The design of many Unix-like operating systems is stunning. Even today, the UNIX-style operating system architecture remains one of the best designs ever. One of the most important features of this architecture is the command line interface or shell. The shell environment allows users to interact with the core functions of the operating
Today when I use Tomcat configuration, I use a Mac that uses some commands to configure Tomcat.Here's the problem:I am particularly troublesome to start the Tomcat service every time, because I have to go to the file directory where Tomcat is located, or not to use ~/, but because I put Tomcat in a more "deep" folder, the command looks ugly and long.Problem Solutions:1. Use environment variables (methods for modifying. BASHRC)A. First look at what shell
Shell is like the editor: everyone has their own choice and tries to defend the choice and tell you why it should be used ). Indeed, shell provides different functions, but they all implement the core concept of development decades ago.
I used modern shell for the first time in 1980s, When I was developing software on SunOS. When I understand the ability to use t
Shell translates into shell meaning, it is wrapped in the Linux kernel layer, a series of Linux commands can be issued to the operating system related instructions to the human-machine interface. The shell can combine a series of Linux
Shell Common knowledge
First, the user login into the system after the system environment variables
$HOME user's own directory$PATH directory to search for when executing commands$TZ Time Zone$MAILCHECK every few seconds to check for new letters$PS 1 The prompt number at the command column$PS 2 When the command is not finished, the Shell asks for the prompt number to be entered againSearch path for $MANPA
This article is part of the Linux Shell Series Tutorial series, which includes the following 18 parts:
Linux Shell Series Tutorial (a) Shell introduction
Linux Shell Series Tutori
Linux ------- create Shell program and special characters, linux ------- shellI. How to execute Shell scripts
Shell scripts are text files, so you can use any text file editor (such as vi and emacs) to create and edit scripts. The name of the
Linux shell BASICS (6) and Linux shell Basics6. Detailed description of Shell script programming links the content of the above five parts to increase understanding of Shell 01. shell s
Get weather from Linux-shell and from linux-shell
Using the shell in Linux to get the weather is difficult. It turns out that it is really simple and the single-digit code will be done.Obtain the weather of the target City
All wea
SELF: http://www.justwinit.cn/post/3702/
Shell time:A = 'date + % Y % m % d'
Echo $;
# Sh data. Sh
20101028
#! /Bin/sh
# Log
Mydate = 'date + % d % m % y'
# Append mydate to the variable logfile that holds the actual filename of the log
Logfile =/root/test_log. $ mydate
# Create the file
> $ Logfile
Mytime = 'date + % d % R'
Logfile2 =/root/test_logtime. $ mytime
# Create the file
> $ Logfile2
Two files are generated:Ls/root/test_log.281010
/Root/test
From a programmer's point of view, the shell itself is a program written in C language, from the user's point of view, the shell is the user and the Linux operating system communication Bridge. Users can either enter command execution and use shell scripting to accomplish more complex operations. In the
:07Variables in shell scripts
You should use a variable instead when you use a string more frequently in your script and the string length is long
When using conditional statements, variables are often used?? If [$a-gt 1]; Then ...; Fi
When referencing the result of a command, replace it with a variable?? n=wc -l 1.txt
When writing scripts for user interaction, variables are also necessary?? Read-p "Input a number:" N; echo $n?? I
Use linux shell to automatically pin and linux shell to pin
If I post a post on the Forum to ask something, once the post fails, it will sink in seconds, but I really don't want to go to the top all the time. What should I do? The following shows how to use shell crontab t
Linux shell BASICS (5) and Linux shell BasicsV. bash operations and startup script 01. history of bash commands # history ...... # Set (show all variables) | grep HISHISTFILE =/root /. bash_historyHISTFILESIZE = 1000 (number of historical files) HISTSIZE = 1000 (historical file size) # vi/root /. bash_history ...... (1
Linux-shell test, linux-shell
Nature of testing:
Is an operation command
According to $? Return Value to determine whether the condition is true
Operation Specifications:
Format 1: test Condition expression
Format 2: [conditional expressions]
Contact Method for test operation:
Direct root echo YES judgment result
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.