A few simple shell scripts to draw

md5

First timed crawl server JVM related information #! /bin/sh #get_current_time export java_home=/opt/jdk1.6.0_10/ export path= $JAVA _home/bin: $PATH Export classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar: $CLASSPATH date= '

Shell script generates a directory tree structure text file--Snippets

For whatever purpose, the script's role is to generate a directory-tree-structured text file that supports Chinese and file directory names with spaces. Like what$./gdt.sh/cygdrive/e/ccccc-oCcccc.txt The/CYGDRIVE/E/CCCCC directory tree structure

The expression __linux of Linux shell

Strictly speaking, there is no concept of an expression in the shell. The shell itself is simply a collection of commands, and certainly not a bunch of random piles, but a certain organization. But this organization is not so rigorous, so this

Shell script recursively prints all catalog files in the specified directory

#!/bin/bash #递归打印当前目录下的所有目录文件. PRINTF () { ls $ | While read line #一次读取每一行放到line变量中 do [-D $1/$line] && { dir= "$1/$line" echo $ DIR } dir1= ' dirname $DIR ' #求路径. a= ' ls-f $DIR 1 | grep/| grep "\"

Use of sed for example--unix Shell

Sed and awk are powerful text filtering tools in the UNIX environment. With SED and awk, it is easy to edit local files, and it is easier to use regular expressions to filter out the output of other commands. SED represents the stream Editor,

The difference between a single middle bracket and a double bracket in a shell

The difference between a single middle bracket and a double bracket in a shell 1.["[" is an executable program, the path is "/usr/bin/["He is equivalent to the executable program "test". Example:If [3-eq 2]; Thenecho "= =";Elseecho "!=";Fi

Export database query results to excel through the shell and send them to the mailbox by mail

Export database query results through the Shell to Excel, and send messages to the mailbox #!/bin/bash# through the shell to query the data information and save in Excel, and record the log #data:2018-06-14#name:zhang# Database connection address

Linux Shell Example (i)

First, the environmentSystem: Centos6.6 x64Shell:bash, SH[[email protected] ~]$ hostnameShell[[email protected] ~]$ lsb_release -aLSB Version:

Enterprise Shell face questions and answers

1. Interview questions: Use the For loop in the/tmp directory to create 10 HTML files in bulk, where each file needs to contain 10 random lowercase letters Plus fixed string template, such as the followingAaesdffbnv_template.htmlMethod 1:Cd/tmpfor ((

Shell scripting basics, using variables, conditional testing and selection, and list-looping

Shell languageScript: Can run, a file, can implement some function (command stacking)[Email protected] ~]# vim/root/stu.shecho Hello WorldCat/etc/redhat-releaseUname-rHostnameIfconfig | Head-2[Email protected] ~]# chmod +x/root/stu.sh[Email

The environment variable setting technique under Linux, do not need to/etc/profile but create a new shell file in the/ETC/PROFILE.D directory to set

Difference:1, two files are set environment variable file,/etc/profile is a permanent environment variable, is a global variable,/etc/profile.d/set all users to take effect, is also a permanent variable, is a global

Introduction to bash features and shell scripts

The logical relationship of the multiple command execution of bash features:1. Command replacementCOMMAND1 $ (COMMAND2)2. PipingCOMMAND1 | COMMAND2 | COMMAND3 ...3. Sequential execution structureCOMMAND1; COMMAND2; COMMAND3 ...4. Select the

Linux Learning Summary (62) Shell script 5-Monitoring System development

Requirements: Use the shell to customize a variety of personalized alarm tools, but the need for unified management, standardized management.Idea: Specify a script package that contains the main program, subroutine, configuration file, mail engine,

Linux/centos shell script non-interactive password change

Today when writing a shell script to find the need to set the user's password, and the setting of the password is interactive, so in the script is obviously not very good, so the Internet to find information, found the following two non-interactive

Spark-shell Start spark Error

Objective  After installing CDH and Coudera Manager offline, all of your own apps are installed through Coudera Manager, including HDFs, hive, yarn, Spark, hbase, and so on, and the process is a twist, so don't complain and go straight to the

Shell script implementation 99 multiplication table

#!/bin/bash #for嵌套for循环 #9 *9 Multiplication Formula Echo "for 99 multiplication table" for ((I=1; i Do For ((j=1;j Do #当 $j less than or equal to $i, the multiplication table is printed on the screen [ $j-le $i] && echo-n "$i *

Shell EXEC command executes shell print output to a file

[Email protected] ~]#Cat 1.SH #!/bin/bashexec1>>/tmp/2. log2>>/tmp/2. LogDate Echo 111LdkkdfkslfdsDate[[Email protected]~]# ./1.SH[[Email protected]~]#Cat/tmp/2. Log Sat June9 the: ,: +Utc2018111./1.SH: Line6: Ldkkdfkslfds:command not Foundsat June9

Shell Programming Awk Advanced

awk operatorArithmetic operators: x+y, X-y, x*y, x/y, X^y, x%y-x: Convert to negative +x: convert to NumericString operator: unsigned operator, string connectionAssignment operators: =, + =,-=, *=,/=,%=, ^= + +,--Comparison operators: = =,! =,;, >=,

Functions, arrays, alarm system scripts in the shell

1. Functions in the shellThe function is to organize a piece of code into a small unit, and give the small unit a name, when the code is used to call thisThe name of a small unit.Format: function F_name () {Commond}function must be placed at the

New Peanut Shell +tomcat released Javaweb project "pro-Test effective"

First, new peanut Shell 1.0On the Peanut Shell official website (http://www.oray.com) Download "New Peanut Shell 1.0" installation software, software installation completed, need to register, after the successful registration of Peanut Shell website

Total Pages: 541 1 .... 141 142 143 144 145 .... 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.