The example above the Linux Shell script illustrates the conversion of decimal and binary, and ends the learning of this Part with an instance related to file loops. I believe that the basic learning of Linux shell scripts should be able to master
PS1: the user's usual prompt.PS2: the first line is not complete. Wait for the prompt entered in the second line. Public setting location:/etc/profile Echo $ PS1 can see the current prompt settingsFor example, Green is displayed and time and shell
Abstract: For the current software industry, the purpose of encryption is to seek as long as possible not to be decrypted, during which time the development investment and new product versions are withdrawn. The shell method can be used
The basic course of Linux Shell script describes the beginning, comments, variables, and environment variables of the basic syntax. Here we will introduce the first part of the shell command and control process, three types of commands can be used
ProgramIt is written by humans, and errors are inevitable. If you want to know what your program is doing, there is a good way to enable the trace execution function. This causes the shell to display each executed command and add "+" to the front. A
-RW-r -- access rights to the file. The first character indicated the type of file.
A leading dash means a regular file, while a 'D' indicates a directory.
The next three characters are the access rights for the file's owner,
The next three
Original article address:
Http://dev.firnow.com/course/6_system/linux/Linuxjs/20071027/80454.html
Both exec and source are Bash Internal commands (builtins commands). Enter man exec or man source in Bash to view all internal command
Keywords : Android am activitymanager: Go to shell to reference C: "events and settings" mawenjian> ADB Shell check the help reference of the command # Am-help am-help error: Unknown command:-help usage: am [Start | instrument] am start [-A
If-fi
#! /Bin/bash # delete a file and create a file file = readme function delfile () { If [-e. /$ file]; then RM-f. /$ FILE echo "del $ file... " fi } function AddFile () { If [! -F. /$ file]; then touch $ file echo "add $ file... " fi }
// The question is very simple, that is, the area of the maximum triangle of N points .. Think of convex bag .. A look at the data, 1000000. If you use enumeration, it will certainly be TLE ..// It took two days to see the rotating jamming case .. I
in command line (that is, start-run-input cmd) mode, if you enter the ADB shell command, two errors are generally reported. One is that" ADB is not an internal command or an external command, it is neither a running Program or a batch file. The
First line #! Bin/sh
End with exit 0
Judgment:
I = "morning"
If test "& I"-EQ "morning"
Then ECHO "& I"
Elif test "& I"-EQ "Afternoon"
Then ECHO "$ I"
Else
Echo "night"
Fi
Echo "Please input yes or no"
Read I
Case ($
ArticleDirectory
Cat
Chgrp
Chmod
Chown
Copyfromlocal
Copytolocal
Count
CP
Du
DUS
Expunge
Get
Getmerge
Ls
LSR
Mkdir
Movefromlocal
Movetolocal
MV
Put
Rm
RMR
Setrep
Stat
There are many methods to convert relative paths to absolute paths. I don't know if there are any ready-made bash commands. I wrote a script first, which is also counted as practice shell programming.
At that time, I thought of the first method,
History display command history list
← (Ctrl + p) display the previous command
Hide (Ctrl + n) display the next command
! Num: The num command in the History list.
!! Run the previous command
!? String? Execute the latest command containing string
Excerpted from: ABS_Guide translator Yang chunmin Huang Yi
When will Shell scripts not be used?
Resource-intensive tasks, especially when efficiency needs to be considered (such as sorting and hash)
Mathematical operations that require processing
Recently, I am working on a project, because some functions are implemented using ORACLE package, but it is very good to use UNIX scripts, therefore, an executable host request is mounted on the AP to solve this problem.
I think this is a little
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