In the GNOME desktop environment of RedHat Enterprise linux4, gnome-terminal is used by default.
ProgramIn, sometimes Shell needs to be called for execution. At this time, we need to start gnome-terminal. How to run the program is actually very
Address: http://blog.csdn.net/gtuu0123/article/details/6013741
(1) substr in awkSubstr (source string, start index, length) Start index starts with 0Example:Awk '{$ A = substr ($, 2); print $ A;}' filenameAssume that only one row in the file is
/*************************************** ******************************* Author: Samson* Date: 08/18/2012* Test Platform:* GNU Linux version 2.6.29.4* GNU bash, version 4.0.16 (1)-release (i386-redhat-linux-gnu)
************************************
Replace, which is included with MySQL.
Usage (matching is based on the comparison length ):Replace from to [from to]... -- file 1 file 2-- The following file list may also be changed to standard input.
For example: Stlxv @ stlxvcomputer :~ /
Regular Expression
$
Matches the end position of the input string. If the multiline attribute of the Regexp object is set, $ also matches '/N' or'/R '. To match the $ character, use/$.
()
Mark the start and end
Recently, I learned the content of shell script writing and read the script easily. But in fact, there are still some difficulties in hand, so I decided to find some examples to practice, after all, there is a saying that is very good: "I have to
When I went to bed in chemistry today (Khan ......) dreaming, dreaming of penetrating a magic = off PHP injection point, and then happy mouth water flow (..... sleep too much), suddenly woke up, and immediately wrote the dream idea on the paper:
Mycommand> mylog.txt 2> & 1 should be the most classic usage.
Command results can be output in the form of "%>", % indicates the file descriptor: 1 indicates the standard output stdout, and 2 indicates the standard error stderr. The default value of
In Shell, only one process can be implemented at a time:
1. lockf command
2. Simple implementation:
I = 'ps-Ef | grep [N] ew_mvbackup | WC-l' if [$ I-GT 1];ThenEcho "wait for the other mvbackup finish! "Exit-1Else
# Do something here
3.
1,Find Command OptionsThe f I n d command has many options or expressions. Each option follows a horizontal bar -.-Name: searches for files by file name.-Perm searches for files based on the file permissions.-Prune can use this option to make the f
Implement a shell script for folder SynchronizationAlgorithm:
1. First find/pathname-print> filea # Get the full names of all files in the two folders. 2. Compare files. Delete unnecessary files in the folder to be synchronized. Then obtain the
1. Write a script to calculate the factorial of 10 in a loop.
#! /Bin/sh factorial = 1 for a in 'seq 1 10' DO factorial = 'expr $ factorial/* $ a' done echo "10! = $ Factorial "
2. Write a script. After the script is executed, print a
SAs the most attractive and indispensable component in UNIX operating systems, hell has not only not been eliminated after dozens of trials, but also become more mature and stable, probably because it is a very solid adhesive that can match a large
Use the dbms_pipe package and create a daemon running on the OS
I think this method is complicated. I still need to use Pro * C. I didn't try it. Here is an example.
Use Java's getruntime(cmd.exe C
Java uses a lot of such advantages.
1) write a
Before giving you a detailed introduction to linux compilation, let's first understand the Linux script Shell command. The following explains how to use arbitrary unix commands in shell scripts.
Basic syntax Introduction
1. Start
The program must
Simple shell script encapsulation for wget
Article: http://blog.csdn.net/5iasp/article/details/8862303
Author: javaboy2012Email: yanek@163.comQq: 1046011462
Purpose: capture a url and save it to a specified file in the specified directory.
This problem is related to the shell Interface Programming part. When a complicated problem occurs, no matter which part of the folder is operated, the Operation should start from the root node (Desktop) of the shell file system, until you find the
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