Take out a string of specific long strings in a seriesMethod One#!/bin/bashhello= "hello,world.my name is Jerry,what ' your name?" For word in ${hello[@]};d o [${#word}-GT 4] && echo $worddoneMethod Two[' Echo $word |wc-l '-GT 4] && echo $wordMethod
Reference "Bird's private cuisine--linux Basic Study (third edition)".In "bird Brother's private cuisine--linux Basic Study (third edition)" in the 11th chapter, bird Brother about the variables of the test and the content of the replacement, the
Shell grep matches ChineseTest text demo_exe.c, content as follows, need to pay attention to the saved encoding format, the output to the terminal has an impact:Our Chinese operating system Asni by default is GBK.1#include 2#include 3#include string.
Bash Script programmingOne, Bash script programmingBash script programming (can be understood as a stack of commands)Program: Contains statements and expressions (with judgments and loops)Sequential executionSelect ExecuteLoop executionprogram =
Well, that's how it started.First of all, this little episode ... It was written, it collapsed, and then I collapsed ... Crash I looked everywhere for a tool that would not let me collapse, and then find out to find the ScribeFire.1. Take parameters
First, Introduction From the programmer's point of view, the shell itself is a program written in C language, from the user's point of view, the shell is the user and the Linux operating system communication Bridge. The user can either enter command
1. Read the value of the Jdbc_url parameter in the configuration file ($InputParamFile the absolute path of the destination file to be read)Jdbc_url= ' grep ' Jdbc_url ' $InputParamFile | Awk-f ' = ' {print $} '2. Modify the value of the
#!/bin/sh notifications are explained by bash. If you execute the shell command date in the Echo statement, you need to precede the date command with the symbol &;You cannot execute the file immediately after editing the file, and you need to set
This study: Understanding the shell, how to write shell scripts and executeThe shell is actually a program that interprets the execution of commands,The so-called shell programming is to use a certain syntax to combine the various basic commands,
I. User and user group management . Root User: The system is unique, is real, can log on the system, can be operating system any file and command, with the highest authority; 2.Virtual User: Distinguished from real users, such users do not have the
A string interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.hao.com/123.htm1 # Intercept, delete the left character, and leave the right character.Echo ${var#*//}where Var is the variable name and the #
1:shell Basics:Learning about Linux is known to have a shell concept, the shell is between the user and kernel, the user's operation or instruction through the shell interpretation passed to Kernel,kernel can understand and perform the corresponding
Issue: After executing the "su– username" in the shell script, the script terminates execution and switches to the interactive interface behavior of the specified user name in su: I execute a script in root, but some of these commands or scripts
The requirement of exercise 3.2 is to write a function with the same dup2 () function without using fcntl (). It is intuitive to constantly use the DUP () until the specified file descriptor is returned.
#include
#include
#define OPEN_MAX 6
1111111111111 simple command script to clear messages log file under/var/log/var/log/the log file when the system files, must have root permissions:$UID is the global variable of the system:Make && make install indicates that the previous success
Linux Shell script introduction Reading Notes Chapter 1 test and testI. Introduction
1. Bash (Bourne Again Shell), which is currently the default shell environment for most GNU/Linux systems.
All commands are input and executed in the shell terminal.
Password Change in non-interactive mode in Shell scriptsToday, when I wrote a shell script, I found that the user's password needs to be set and the password is set to interactive. This is obviously not good in the script, So I went online to search
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