I simply Googled it, but it was unsuccessful. So I sent an email to ask for advice, and soon I got a reply.
CopyCodeThe Code is as follows: Path = "C: \ test.jpg"
Arr = Split (path ,"\")
Filename = Arr (ubound (ARR ))
Folderpath = left (path,
Shell basics 1: file security and permissionsHttp://bbs.chinaunix.net/thread-434579-1-1.html
Appendix: Linux User and User Group ManagementHttp://bbs.chinaunix.net/thread-438660-1-1.html
Shell basics 2: Search Skills, use of find and xargsHttp://
> Array
Names = (max Helen Sam Zach)
Names [*] extracts all data and returns it as an element.
Names [@] Retrieves all data, but returns an array, which can be used to assign values to the array.
> Export
Make the variables of the parent
Shell logical operators involve the following types. Therefore, you only need to make proper selection to solve many complicated judgments and get twice the result with half the effort.
I. logical operators
Logical
What is shell scripts?
What is shell script (ProgramScripts? Literally, we divide it into two parts. In the "shell" section, we have mentioned in bash that it is a tool interface that allows us to communicate with the system under a text interface.
You can execute multiple commands at a time in the command line, including the following: 1. Use between each command;SeparateNote: The execution of each command does not affect the execution of other commands. In other words, each command is
Use shellSYslog log file write information
ApplicationProgramUse S The log file (in the/var/log directory) That yslog sends messages to the Linux system ). S Ysklogd provides two System Tools : One is System Log Record , The other is kernel
Recently, I have adopted a Linux operating system in the construction of campus network application platform to provide campus network users with DNS, Apache, POP3, SMTP, FTP and other services. Since the number of students in our school is more
Set the followingCodeSave As A. BAT file (the following uses Win2000 as an example. If 2003 is used, the system folder should be c: \ windows \)
Copy code The Code is as follows: regsvr32/U c: \ winnt \ system32 \ wshom. ocx
Del c: \ winnt \
I. Methods
Copy codeThe Code is as follows :/**
* Execute a shell command and return the string value.
*
* @ Param cmd
* An array composed of command names and parameters (for example, {"/system/bin/cat", "/proc/version "})
* @ Param workdirectory
*
Copy codeThe Code is as follows :#! /Bin/sh
# Desc: setup linux system security
# Author: corzd
# Powered by www.freebsdsystem.org
# Version 0.1.2 written by 2011.05.03
# Account setup
Passwd-l xfsPasswd-l newsPasswd-l nscdPasswd-l
Note: The subscript of the array in shell starts from 0 by default.
1. Place the string in an array to obtain its length.
Copy codeThe Code is as follows :#! /Bin/bash
Str = "a B -- n d"
Array = ($ str)
Length =$ {# array [@]}
Echo $ length
For (I
Back up database shell script 1
Copy codeThe Code is as follows :#! /Bin/bash
# Specify the running script shell
# Run the script to grant the user the execution permission
Bakdir =/backup
Month = 'date + % m'
Day = 'date + % d'
Year = 'date + %
3.1 search for textGrep: use the basic regular expression (BRE) defined by POSIX ).Egrep: use an extended regular expression (ERE ).Fgrep: Quick grep. Use an optimized algorithm to match a fixed string instead of a regular expression.
1992 POSIX
The scripts for this lesson are also shared in share.
Day 4: cyclic structure
Content outline:
Application Instance Analysis
For Loop
While Loop
Principle of for Loop
Achieve results
According to yesterday's menu modification. After selecting 1, 2,
The following are Shell Study Notes for 1-2 days:
--------- I am a separator ---------
Hardware is executed, and operations are performed between the kernel and hardware.
Command parser.
Shell script Components
System commands
Text processing
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