Shell is a special feature.
ProgramIt is an interface between the user and the core program (kernel) of the UNIX and Linux operating systems;
Various operating systems have their own shells. For example, the shell of DOS is the command.com file,
Recently, I encountered a problem. After the database is installed, the set oratab is not easy to use and cannot be started automatically. solution:
Log on and edit with Root
/Etc/rc. d/rc. Local file. This file is executed after the system
1. Date
Get time and date
Date = 'date + % Y-% m-% d-% H'
Echo $ {date}
2. cron
Add a Task Scheduler
# Vi/etc/crontab
Crontab task format
* *** User task
Minute hour, day, month, week, user task
Field
Description
Linux Shell is a powerful script program with simple syntax. The following is an executable sh script, covering common shell syntax and usage. Understanding it is equivalent to getting started.
#! /Bin/bash# Title:# Date :?# Author: Made by
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
#! /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
This is the first thing I did in my company that is directly related to programming and requires shell commands. In fact, I feel that the shell under Linux is the same as the DOS batch processing under windows.
Question:
1. Use the shell language
In Linux, The SED command is used to replace the text. The command that matches the regular expression can be replaced flexibly with SED, which greatly reduces the workload. It can be said that SED is the main force of replacement in shell scripts
I used shell to write it. At that time, I had a little understanding of it. Now I completely forgot it. But I still can understand it, so I won't write it. They are all simple questions assigned by teachers.
1. Select addition, subtraction,
Unix shell programming (1)
Unix only recognizes three basic file types: common files, directory files, and special files.Normal file: any file on the system that contains data, test, program instructions, or just about anything else.
Number of words
1 installation error: install_failed_insufficient_storage
Solution:1. Connect the data cable to the computer and use the "disk drive" method.2. Go to the. android_secure directory under sdcard (use a third-party Resource Manager)3. Delete the smdl2
Shell script compiling basics in Linux, although there are a variety of graphical interface tools, token is still a very flexible tool. Shell is not only a collection of commands, but also a very good programming language. You can use shell to
The most important script language in Linux is Bash. I will write this (I will only use this :)). Compared with other development languages (such as C), bash is a relatively simple language, mainly used to write some script code, some batch
Collect common skills and notes.Occasionally updated.
1. Shortcut Keys
Terminal shortcut:
CTRL + C: Stop Ctrl + Z: switch to the background Ctrl + D: cancel the current session Ctrl + W: Delete the command parameter Ctrl + u before the cursor:
By using the startup script, you can make the custom environment ready for use once and for all.These scripts run when the shell is created.The startup scripts run vary depending on whether the shell is used to log on to the shell or not.We use "Su-"
Windows 98ShellLanguage
Yang shanhe
The Senior cfan from Dos crawlers knows that the batch processing language "batch" edits a batch processing file and can be executed in DOS immediately to complete tasks that do not require too much
Document directory
Syntax of the read command:
Process Input
Original article: Linux Shell scripting tutorial V2.0Syntax of the read command:
read -p "Prompt" variable1 variable2 variableN
-P "prompt": displays the prompt information
[From] http://www.ixdba.net/a/ OS /linux/2010/0422/35.html
Shell may often see:>/dev/null 2> & 1
Command results can be defined in the form of %>
Break down this combination: ">/dev/null 2> & 1" is five parts.
1:> indicates the redirection
Li Sanhu, the second International Class 2 of the 2010 International Software Institute of Wuhan University, hasn't written any logs for a long time. Today, I wrote one.
I recently feel that the book is still very classic for learning a new language.
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