In Linux, shell is a commonly used tool. In Red Hat Linux, we usually use B shell or bash. In Shell, we always want to set some environment variables or other initialization operations when opening this shell. But how can we do this? Although we can
The following is an example of starting a hypertable database by executing shell commands in Java.
/** * Start the Database Service * @ return */ Public String startup () { // The command is dead. string commands = "HT start all-servers
When executing a shell script (calling JavaProgramWhen you modify an Excel file), you can obtain the desired result by Sh.
However, after the crontab is scheduled to run, no new Excel file is obtained, and no log error is reported.
After checking
Why is Shell-mode a good tool for dealing with such complex environments? Let's take a look at the problems in Shell in this environment, and then let's take a look at how Emacs's shell-mode solves these troubles.
The first is Shell
Okay. Run this script and you will understand it.#! /Bin/bash
Until
[
$
#-EQ 0]
Do
Echo
"$ @"
Shift
Done
See the role. When shift (without parameters) is run each time, a parameter is destroyed and the subsequent parameter is moved forward.
Sometimes a task runs for a long time and needs to be run in the background. Otherwise, the task will be terminated after the console is launched. This article describes how to run the task in the background.
For example, for a shell script,
1. The method for modifying the language family is:
[Root @ test root] # lang = en (specify other syntaxes as needed, such as C)
[Root @ test root] # export Lang
Linux VI deletes all specified characters
Press ESC to return the command
Shell statement usage tips 1. Are you anxious to call the system "create shortcuts" Wizard to create shortcuts that VB does not support? Although you can call the fcreateshelllink function in vb5stkit. dll,
But it is designed for the installer. The
Use the if statement to determine parameters in shell programming
-B. returns true if the file exists and is a block file.
-C: returns true if the file exists and is a character file.
-D. If pathname exists and is a directory, true is returned.
-E:
"Back" | "tab" | "clear" | "return" |
"Escape" | "space" | "prior" |...
The names of all keys can be found in winuser. h. The hotkeys are case insensitive.
The hotkey can only activate shortcuts on Windows desktop or Windows Start Menu.
Windows
Windows supports a total of seven shell extensions,
They are:
Copy hook Handler)
Context Menu Handler)
Drap-and-drop Handler)
Icon Handler)
Property sheet Handler)
Drop target Handler)
Data Object Handler)
The copy hook handler is a simple shell
SELF: http://lulu87.blog.51cto.com/1244696/373771
Case 1: use shell scripts for System Management
Lab Environment
The company is equipped with a Linux server for technical training at the Branch Office. Therefore, you need to add user accounts
Why should I quit? Why should I quit? Why can't I exit with exit? Why... yes, shell does exit with exit, but, however, what we're talking about is not that cheap...
In our daily work environment, there is such a characteristic. We will first log
Author: gnuhpcSource: http://www.cnblogs.com/gnuhpc/
Color is selected by adding a special sequence-basically a numerical value between "/E [" and "m. If more than one numeric code is specified, separate them with semicolons.Echo-e "/E [31; 40 m"The
Sometimes, the execution path of the entire shell script file is determined based on the command execution result status.
A simple requirement is to determine whether a row of content exists in a file. If yes, no operation is performed. Otherwise,
Wshshell objectProgid wscript. ShellFile Name wshom. ocxCLSID F935DC22-1CF0-11d0-ADB9-00C04FD58A0BIID F935DC21-1CF0-11d0-ADB9-00C04FD58A0B
The following table describes the properties related to the wshshell object.Attribute descriptionEnvironment
Echo-e "/033 [32; 49; 1 m [done]/033 [39; 49; 0 m"Output result: [done]###########################The color of the text terminal can be generated using an ANSI unconventional character sequence. Example:
Echo-e "/033 [44; 37; 5 m me/033 [0 m
Shortcut Operators
If you are familiar with the C language, you may like the following expressions:
[-F "/etc/shadow"] & echo "This computer uses shadow passwors"
Here & is a shortcut operator. If the expression on the left is true, execute the
This article Reprinted from http://www.linuxsir.org/bbs/thread362001.html? Pageon = 1
Terminal (terminal, or physical terminal ):
It is a device, not a program. Generally, it is a device that provides a command line user interface, typically a
Arithmetic Operations and Comparison
1. Operator (let identifier)
+ Addition-subtraction * multiplication/division ** power operation 3 let "z = 5 ** 3" % modulo bash $ expr 5% 3
2. comparison operator (note that a space is required between []
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