Verify read/write files in Linux Shell

#! /Bin/shsrc_file = $ 1dst_file = $2 # cur_time = $ (Date "+ % H: % m: % s") # end_time = '09: 00: 00 'cur _ date = $ (Date "+ % Y-% m-% d % H: % m: % s ") end_date = '2017-08-25 14:58:00 '# end_date = '2017-06-01 08:31:00' cur _ datestamp = $

Java calls shell scripts

I just got started with Linux development and recently encountered the problem of calling shell scripts in Java. I found a method suitable for cainiao-level development, as described below:   Add # In the first line of the shell script to be run

Determines whether a parameter is an integer in shell.

Determines whether the parameter is an integer.#! /Bin/bash function inttest () { for Arg DO # Arithmetic Operators, when the parameter is an integer, the execution fails. ($ Arg) 2>/dev/null # blocking error information If [$? = 0] then

Automatically sync shell scripts of Android source code

The company's network is too bad, syncCodeThe speed is only 15 kb/s !!!   I can't bear to go online and find a shell script:   #! /Bin/bash echo "====== start repo sync ====" repo sync while [$? = 1]; DO echo "===== sync failed, re-Sync

Unix shell book

1. Basic Knowledge CAT/etc/ShellCHSH/bin/tcshEmacs = Vi?PdkshZsh B C KPID is 1 not 0 Home variables exists in passwd, And the last entry of passwd is sh. PS-Ef svr4PS au for BSD/Linux ps Echo $ statusEcho $? EUID // can be changed, like

Deployment of peanut shell + Tomcat + javaweb Project

Recently, the customer has been engaged in projects. The customer is eager to see the results. The boss always forgets to buy a domain name. There is no way to register a free domain name through the peanut shell for configuration. Because the

Change Windows Default User Shell Folders

The current user configuration information in the registry is as follows:-----------------------------------------------------------------------------Windows Registry Editor Version

Shell-colored command line

Color command line  OverviewThis document uses bash shell as an example. (Escape sequences in different terminals are not

Sed in Linux Shell notes

This document describes the basic usage of sed. We recommend that you take a look at the details of SED and awk In the third edition. Sed matches the regular expression to output the command to process the text, it is a headache to be unfamiliar

Shell tip command (z)

Http://hi.baidu.com/zxvb3000/blog/item/9ecd2b022d15490b4bfb5199.html 1. Test commandThe test command is used to check whether a condition is true. It can be used to test values, characters, and files,The test characters and corresponding functions

Basic knowledge of shell script 4-process user input

When the script needs to interact with the person running the script. BASH Shell provides command line parameters (data values added after the command), command line options (single character values for modifying Command Behavior), and direct

Shell-array usage

From: http://www.jb51.net/article/34323.htm 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 the Code as follows:#! /Bin/bashSTR = "a B -- n d"Array = ($ Str)Length =$ {#

Shell matching a regular expression

Is_upper () # Is_upper # Checks tosee if we have a string in upper case # To Call: is_upper $1 { # Check we have the right Params If [$ #-ne 1]; then Echo "is_upper: I need a string to test OK" Return 1 Fi # Use awk to check we have only

Linux Shell progress bar display function (Memo)

1. Code 1   #! /Bin/sh# Output "." progress bar function, compatible with bsh, KSh, and bash# First Trap 1 2 3 15 signal, importantTrap 'Kill $ bg_pid; ECHO; exit '1 2 3 15Function dots{Stty-echo>/dev/null 2> & 1While trueDoEcho-e "./C"Sleep

Shell script learning: quick understanding of Regular Expressions in grep

Shell scripts are the core of Linux, while regular expressions are the core of shell scripts. Understanding regular expressions can quickly match the content to be searched, lay a solid foundation for future shell script programming.   The contact

Run the task (Shell) in the background on UNIX, BG or nohup

Sometimes a task runs for a long time and needs to be run in the background. Otherwise, the task will be terminated after the console is launched. This article describes how to run the task in the background. For example, for a shell script,

The CHSH command in Ubuntu cannot change the default shell (solved)

System: Ubuntu 9.04   "After logging in, type CHSH and press to change the default shell. Depending on the system, you may be asked to enter your login password and the name of the shell to be used. Enter the complete path of the shell to be used.

Shell knowledge point supplement (3)-Modify the language/special characters/printf/SED tool/awk tool/diff/CMP

1. The method for modifying the language family is: [Root @ test root] # lang = en (specify other syntaxes as needed, such as C) [Root @ test root] # export Lang Linux VI deletes all specified characters Press ESC to return the command

Shell-crontab quick Manual

This article is based on the following English documents: http://www.adminschoice.com/docs/crontab.htm. Cron is a UNIX tool that uses cron background processes to automatically execute tasks at a specific time in the future. These tasks are usually

Shell-redirection explanation

Standard InputThe standard input is the file descriptor 0. It is the command input. The default input is the keyboard, or file or other command output. Standard outputThe standard output is the file descriptor. 1. It is the command output. The

Total Pages: 541 1 .... 272 273 274 275 276 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.