1.shell variablesLocal variables:A=1 (no spaces on both sides of the equal sign)Read-only variables:ReadOnly variable name = variable value (cannot be changed during use)Declaring variables:Linux assigns a value to a variable by default as a
Conditional judgment is the basis for a program to gain intelligence, while the Bourne shell script simulates conditional expressions in most programming languages by command.The control structures supported in the shell are:(1) If then else fi(2)
To define an array value:
The difference between an array variable and a scalar variable can be explained as follows.
Say that you are trying to show the names of various students as variable sets. Each individual variable is a scalar variable, as
Conditional judgment statements are not necessary in any program writing, as is the case in shell programming, where the comparison operators that are often used in the shell's test commands are sorted into numeric comparisons, string comparisons,
/// /// All operations on files/// Public class FileOption{/// /// Whether the deletion is successful/// /// Delete the entire file path /// whether the deletion is successful Public bool DeleteFile (string FileFullPath){Try{If (File. Exists
Built-in control structures built-in control structure 1 if control structure
Scala's if structure is the same as that of Java, and the function is not much different. Scala's saying is that if can return a value
Val filename = If (! Args. isempty)
In a structured command, the most basic type is the If-then statement if Commandthen Commandfibash the Shell's if statement executes the IF line definition of the command, and if the exit status code of the command is 0, then the command in the then
1. The first line must specify the shell used: #!/bin/bash/2, Print command: Echo-N: Suppress line breaks3. Use command line parameters:$#: The number of command-line arguments passed in the script$*: All command-line parameter values, with a space
Java to read and delete files in folders
This article will share with you how to read and delete files in folders in java. File. delete () is used to delete "a File or an empty directory "! Therefore, to delete a directory and all its files and
Shell variables and shell Variables
Suppose we define a variable:File =/dir1/dir2/dir3/my.file.txt
You can replace $ {} with different values:$ {File # */}: Delete the first/and its left string: dir1/dir2/dir3/my.file.txt$ {File ### */}: Delete the
Flood problem, string matching ...But I have been wa ..... Woo HooTake precedence over comments, and then look in the parentheses (judging if something is right in parentheses),,, anything else ....#include #include #include #include #include
1. Truncation function file=dir1/dir2/dir3/my. file.txt ${file #*/}: Remove the first/its left string: dir2/dir3/my. file .txt${ file ##*/}: Take out the last/and left string: my.file .txt${ file #*.}: Take out the first. and its left string:
1. string Judgments
STR1 = str2
True when two strings have the same content, length
Str1! = str2
True when strings str1 and str2 are unequal
-N str1
True when the length of a string is
Java (java io-File class), io-1. In the entire io package, the only class that indicates the File itself is the File class. You can use the File class to create or delete files. To use the File class, first observe the construction method of the
Suppose we define a variable:File =/dir1/dir2/dir3/my.file.txt
You can replace $ {} with different values:$ {File # */}: Delete the first/and its left string: dir1/dir2/dir3/my.file.txt$ {File ### */}: Delete the last/and its left string:
Suppose we define a variable: file =/dir1/dir2/dir3/my.file.txt
You can replace $ {} with different values: $ {file # */}: Delete the first/and its left string: dir1/dir2/dir3/my.file.txt $ {file # */}: Delete the last/and its left string:
Before studying the basics of Perl, we would like to have a chance to see the following Perl introduction. Baidu Encyclopedia
First, basic types of Perl
The basic type of per is divided into two types: numeric type and string type.
Numeric types can
The following content is basically extracted from the Shell13 question.1. Truncation function${file#*/}: Take out the first/its left string: dir1/dir2/dir3/my.file.txt${file##*/}: Take out the last/and left string: my.file.txt${file#*.}: Take out
1. Create and run Shell programsWhat is a shell program? Simply put, a shell program is a program that contains several rows.Shell or Linux Command file.Like programming in advanced languages, writing a shell program requires a text editor, such as
Unix application data files and log backup scripts! Usrbinbash regularly backs up data and logs of communication, business, and data processing processes. author: xxx created at: 201374Ex: & gt; chowna + x {afctimingDelDataLog unix application data
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.