1. Load the configuration file sequence during the Linux login process:/ETC/PROFILE→/ETC/PROFILE.D/*.SH→~/.BASH_PROFILE→~/.BASHRC→[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:1 cat ~/2# BASHRC34# User specific aliases and functions 56# Source Global Definitions7ifthen8 . /etc/BASHRC9fi2. shell command prompt and color is configured by PS1:1 Echo $PS 1 2 \[\e[, 40m\][\[email protected]\h \w]$\e[mThe parameters commonly used in
mailbox to see if there are any new messages
PS1: Prompt settings
$: Now this Shell's PID
?: The return code that just completed the command. 0 is correct, non 0 is wrong
E. Variable keyboard reads (read)Syntax: Read [-pt] VarOptions and Parameters:-P: To follow the prompts-T: followed by a description of the wait inputExample:
Copy Code code as follows:
[Plain] View plaincopyprint?
[Root@bogon ~]# Read atest
This is
://blog.mcuol.com/User/For_ATIW/Article/11709_1.htm, and the method described below only takes effect in one terminal, another opens a new terminal to discover path or the original path. To permanently change path See the introduction at the end of this article ~
PS1: The method of directly modifying the contents of the file has not been attempted-for Method 1, because the files installed under the virtual machine do not have root rights to modify t
of the operation is different because of a particular particularity of the string as it is defined, ");Console.WriteLine ("That is, declaring initialization differs from regular classes, does not require constructors to be constructed, so the difference in performance hides its essence from being in the same reference");Console.WriteLine ("The same attribute of the general class of the type, the assignment process of string, that is, the memory address of a string object is given an incoming co
symbol, or if they prefer to define a prompt themselves, simply modify the value of the PS1 variable. For example, change it to:ps1= "Enter a command:"The second-level prompt is displayed when bash requires users to enter more information for the execution of a command. The second level prompts Fummer to think >. If you need to define the prompt yourself, simply change the value of the PS2 variable. For example, change it to:ps2= "More information:"T
(ClassNotFoundException e) {106//TODO auto-generated catch block 107 e.printstacktrace (); 108} catch (SQLException E) {109//TODO auto-generated catch Block E.printstacktrace () 111}}*/113} 6: Here directly in the main method inside the test, so write a userdao to test, see the effect can be. 1 packageCom.bie.dao; 2 3 ImportJava.sql.Connection; 4 ImportJava.sql.PreparedStatement; 5 ImportJava.sql.SQLException; 6 7 ImportCom.bie.utils.BaseDao; 8 9/** * @author Biehongli * @versi
/profile file and insert the following content at the end of the file:
_________________________________________________
# Add by zws
# Customize less
# LESS = '-M-Q-R'
PS1 = "[\ u @ \ h \ w] \ $"
INPUTRC =/etc/inputrc
LESS = '-M-R' #-r for ls | less supports color.
LESSEDIT = "% E? Lt + % lt. % f"
LESSOPEN = "| lesspipe. sh % s"
LESSCHARSET = latin1
PAGER = less
Export LESS LESSEDIT LESSOPEN LESSCHARSET INPUTRC
_______________________________________
deleted the email with subject $ ($individualEmail. Subject) from $Mailbox "}}}#=============================== script end ===== =============================================== 7 to perform bulk deletion of a specified topic list message The Saves the above script as a. PS1 script, which is saved as EWS01.PS1 in this example. Next, create a ACTION_EWS.PS1 script to invoke the Ews01.
1, let the bash command line display the current branch and show the submission status and use different color highlighting to distinguish:650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7A/07/wKiom1ahAZSStKCoAABFTGH-2c4417.png "title=" 1.png " alt= "Wkiom1ahazsstkcoaabftgh-2c4417.png"/>After entering the working directory of Git, display the name of the current branchIf there is a version that has been tracked without staging, use the red * hintIf you have a tracked uncommitted versi
and Andy Gavin together for the PS1 to write the game "The Ancient Wolf" (Crash Bandicoot).At the time, Ram remained the main problem. PS1 only has 2MB of RAM, however we have to do something crazy to make the game fit the hardware. Our game data is about 10MB in size, so we have to do dynamic paging input and output (paged in and out dynamically), although the load lag frame rate drops to 30Hz, but we don
How to modify a Linux Command Prompt
How to modify the Linux Command Prompt:Modify the Linux Command Prompt to modify the Linux environment variable PS1. You can use VI to edit the/etc/profile file and add:Export PS1 = '[\ U @ \ H \ W] \ $'You can also edit it ~ /. Profile file (note the first line #/etc/profile ~ /. Profile)Where \ U shows the current user account, \ h shows the current host name, \ W show
Profile or environment. You can configure one of them.
Profile:
#/Etc/profile: System-wide. profile file for the Bourne shell (SH (1 ))
# And Bourne compatible shells (bash (1), KSh (1), ash (1),...). If ["$ PS1"]; then
If ["$ Bash"]; then
PS1 = '\ U @ \ H: \ W \ $'
If [-F/etc/bash. bashrc]; then
./Etc/bash. bashrc
Fi
Else
If ["'id-U'"-EQ 0]; then
PS1 = '#'
Els
commands like this, such as Echo "hello", CD... and so on. From this point of view, it is a command line that implements the original command line function. But is powershell an enhanced version of the command line, or is it a superset of the command line? This is really not the case. I will discuss this issue in the future.
Just like running an application in the command line, you can run the application in the powershell interaction window as follows:
PS c: \ Users \ v-lukez> notepadps c:
In Linux bash shell, semicolons in statements are generally used as code block identifiers.
1. A single-line statement generally uses semicolons to distinguish code blocks. For example:
Weblogic @ pmtest:/$ if ["$ PS1"]; then echo test is OK; fiTest is OK
In this script or command line, two semicolons are required for the correct statement. The first Semicolon is the semicolon before then, used to identify the end Of the condition block, and the secon
Simple sha1 encryption function example implemented by PHP and phpsha1 encryption example
This example describes the sha1 encryption function implemented by PHP. We will share this with you for your reference. The details are as follows:
function encryptTokey($data){ $apikey = 'testapikey111'; $ps1 = sha1($apikey . strtolower($data)); $ps1 = strtoupper($ps1
script file for execution. The content of the Hello. ps1 script file is as follows:
$a = "Hello"
$a
echo $a > a.txt
dir a.txt
The execution results of the Hello. ps1 script file are as follows:
PS E:\> D:\Projects\Practise\PowerShell\Hello.ps1
Hello
Directory: E:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/30/2013 4:56 PM 16 a.txt
You may find that the PowerShell scr
content with rowcount---------------------------[Email protected]:~$ cat-n. BASHRC1 # ~/.bashrc:executed by Bash (1) for non-login shells.2 # See/usr/share/doc/bash/examples/startup-files (in the package bash-doc)3 # for examples4More . BASHRC : Show file content in separate page.----------------[Email protected]:~$ more. BASHRC# ~/.bashrc:executed by Bash (1) for non-login shells.# See/usr/share/doc/bash/examples/startup-files (in the package bash-doc)# for exampleshead-n 5. BASHRC : Show firs
"]; then #如果shell环境存在且不为sh, read/ETC/BASH.BASHRC if ["$BASH"] ["$BASH"! = "/bin/sh"]; then # the file BASH.BASHRC already sets the default PS1. # ps1= ' \h:\w\$ ' if [-F/ETC/BASH.BASHRC]; then ./etc/bash.bashrc fi Else if ["' Id-u '"-eq 0]; t Hen ps1= ' # ' else ps1= ' $ ' fi fi
1. load the configuration file sequence during the Linux login process:/etc/profile→/etc/profile.d/*.sh→~/.bash_profile →~/. BASHRC →[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:[Root@~/wade/codereview/redis-2.8.17Cat ~#. BASHRC # User specific aliases and functions c10># Source Global Definitions/etc/bashrcfi 2. shell command prompt and color is configured by PS1:[Root@/etc/init.d$PS 1[\[\e[32;40m\]\u@\w] The parameters com
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.