we know that variables are inherited by quilt processes, it can be used directly. In some cases, you may need to inherit functions to facilitate transparent use. The method is very simple. Use "Export-F". Pay attention to the parameter "-F", which
Reprinted: http://langzhe.iteye.com/blog/671762
Prerequisites: the Erl file must be compiled using the debug_info option. Otherwise, the invalid beam file or no abstract code will appear:Error
Compilation Method: Make: All ([debug_info]). |C
Execute the SQL statement of the Oracle database in Shell
#### Function #### Description: Execute an SQL statement ### input parameters: {SQL statement} {database TNS} {database user name} {Database User Password} #### output parameters: SQL
I recently tested LTP. I felt that there were too few materials on hand. I searched the internet and said that I had to look at the code from the beginning, because I had to look at the links in the past, there are too many test cases, so it is no
Some shell combinations
CTRL + L: Clear the screen
CTRL + W: delete the word starting at cursorCTRL + u: Clear the line I. e. Delete the all words from Command LineTab: auto-complete files, directory, command names and much moreCTRL + R: search
Reprinted: http://www.360doc.com/content/10/0303/16/155970_17438894.shtml
Example 4-2. Simple variable assignment
1 #! /Bin/bash 2 # "naked" variable 3 4 Echo 5 6 # When is the variable "naked", such as when the front side is less than $? 7
-B file: if the file exists and is a special block file, it is true.-C file: if the file exists and is a special character file, it is true.-D file: if the file exists and is a directory, it is true.-E file: true if the file exists-F file: if the
#! /Bin/bash
Tc_home =/opt/Oracle/tomcat/
InstanceName = $1 [created instance]
CD...>/dev/null
Template_dir = 'pwd'
Echo $ template_dir
If [! -D $ tc_home]; then
Mkdir-p $ tc_home [Create if the directory does not exist]
Fi
Usemethod
Let's start with an example:
x=1+1echo $x
Are you expecting output 2? Let you down. The output result is 1 + 1. Why? This is because the variable type in shell script is "string" by default, so if the variable type is not specified, 1 + 1 is a
1. Get the return value of Command Execution
?
2. Get the return value of Script Execution
#!/bin/bashecho "A test."exit 0
Echo $ ?, Output: 0
3. Execute programs in the background in Linux
In Windows, use the start command and specify the/B
Shell scripts are similar to the C language and also have a fixed language format. in short, shell scripts are like batch processing files (. BAT), the most basic function is to write a lot of commands together, so that users can easily execute a
Parameters:% H (expressed in-23 ).% I hour (expressed as 01-12 ).% K hour (expressed as 0-23 ).% L hour (expressed as 0-12 ).% M minutes (expressed in-59 ).% P am or PM.% R time (including hour, minute, and second, expressed in 12 hours AM/PM ).% S
Write a script:1. Create a directory/tmp/scripts2. Switch the working directory to this directory.3. Copy the/etc/PAM. d directory to the current directory and run the test command again.4. Change the owner of test and its files and subdirectories
Example 5 insert some content after some strings
[Rocrocket @ rocrocket programming] $ cat mysed.txtBeijingLondon [rocrocket @ rocrocket programming] $ SED's/B. */& 2008/'mysed.txtBeijing2008London
The purpose of this command is to add the following
[Starting text]
Ln is a magic command. It can create a file shadow or enter another place through one channel. :) In fact, all these tricks are implemented through soft connections and hard connections.
Let us assume that you have read the article
1. system environment variables after the user logs on to the system:$ Home user's own directory$ Path: the directory to be searched during Command Execution$ TZ Time Zone$ Mailcheck the number of seconds to check whether a new letter exists$ PS1
Color is selected by adding a special sequence --Basically"/E ["And"M"Between numeric values. If more than one numeric code is specified, separate them with semicolons.Echo-e "/E [31; 40 m"
First digit (31)Foreground color(Red); The second digit is(4
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