Ubuntu write boot from shell script

1. First, write a simple shell script Vimtest.sh (Nano is not used to use VIM) Enter Vim and press the I key, then enter (#!/bin/sh symbol #! to tell the system that its subsequent parameters are the program used to execute the file.) )

Hill (shell) sort __ Hill Shell sort

The average time complexity of hill sort is O (nlog2n), Space complexity is O (1), time performance between O (n^2) and O (nlog2n). Hill sort is an unstable sort method whose performance can be fully played in the number of records to be sorted. The

How to learn, use the good shell

Shell in the large data domain is an essential tool, how to learn how to use a good shell, start with a simple command If [-Z "$DIRNAME"] what does this-Z mean? File operations like this are useful in shell programming: I've summed up some of

Crontab+shell Job Flow scheduling __hadoop

In the previous article, we had a simple reference to the pseudo code of the shell or Python dispatch hive, and today we are enriching the pseudocode http://blog.csdn.net/haohaixingyun/article/details/51821444 Note that in the actual production

[Shell] uses the Find command to locate recently modified files __ Memo Material

Find command: Search for files in specified directory commonly used option: -name: Specify the filename, or use "*.py" to specify the suffix name of the file, such as searching all the py files under the/home directory Find/home-name ' *.py '

Spark-shell-Initiated problem solving _hadoop

Spark-shell-Initiated problem solving Today in the start of the Spark-shell model of the wonderful appearance of the following several problems 1 Port occupancy: 4040 Port is occupied, we know that 4040 is the worker's port use, but is occupied, as

Shell Script Pass Parameter

What does it mean in the shell that we will see the symbols of $ , $, and $? Simply put is the name of the shell script that you wrote, the first parameter you wrote to your shell script, and the second parameter that you wrote for your shell script.

The shell extracts the file suffix name and determines whether it is a specific string

If the file is a. css file or a. js file, it is processed.file=$1if ["${file##*.}" x = "css" x]| | ["${file##*.}" x = "JS" x];then do somethingfiAttention:1> extract file suffix name: ${file##*.}# #是贪婪操作符, match from left to right, match to the

"Shell" Shuf command extracts random rows of a file

The Shuf command can randomly extract different lines of a text file, output to a file or standard output.Shuf usage: Shuf [options] ... [File] or: Shuf-e [Options] ... [Parameters] ... Or: Shuf-I. lo-HI [Options] ... Write a random permutation of

linux--more practical shell commands

1) Count the number of rows in the index.php file in the current directory[[email protected]_web1 ~]# cat index.php |wc -l172) Statistics web directory, JS file number:[[email protected]_web1 ~]# find web/ -name "*.js" |wc -l3) Statistics web

Kettle under Linux for shell scripts to perform conversion tasks

1 Create a good conversion under Windows and place it under one of the Linux folders. such as: Put the 0816_em.ktr file under the/home/cfj/kettle/testdemo.Note that the database user name and password may need to be changed if it is a job file such

Shell daily Practice-find intruders by monitoring users ' logins

#!/usr/bin/bash#用户检测入侵工具Authlog=/var/log/secureif [[-N $]];thenAuthlog=$1echo "Using Log File: $AUTHLOG"FiLog=/tmp/valid.$$.logGrep-v "Invalid" $AUTHLOG > $LOG #将系统中有效的用户users=$ (grep "Failed password" $LOG |awk ' {print $ (NF-5)} ' |sort|uniq) #

A shell programming fun exercises, see you will not?

guess the number game. First let the system randomly generate a number, give the number a range (1-60), let the user enter the guessing number, the input is judged, if not meet the requirements, give high or low hint, guess the right after the

Shell commands ln to link files to other directories

In the project you need to train in a batch of new datasets with the same format, without having to copy the new data set to the original training data directory, and simply create a link to the new data file in the original training data

Child shell Test

Pstreeecho $$//Current process PIDEcho $PPID//Parent process IDSub-process test:New file:[Email protected]]~ # VI bashpid.sh#!/bin/bashEcho $BASHPID//测试[[email protected]]~ # echo $BASHPID //当前shell 6136 //结果[[email protected]]~ # bash

How to use the shell to determine the size of a version number

If you want to compare two version number strings through the shell, such as two version numbers 1.1.2 and 1.2.1 Two versions who are relatively new.The simplest is to use the sort command. With the parameter "-V" the sort command can sort the

Simple shell command

System variables, display all variables of the current shell set reference variable $ plus variable nameGlobal variable: Export variable nameAssign the return value of the command to the variable: a= ' ls-la ' inverted quote equals a=$

Shell gets two columns of values from a single line of files

The contents of the log file are as follows:logid=2210608107 worker_id=140610281404160 optime=1452598610.631276 msg=service+not+found+in+share+memory service=Redis_doc_pushThe post-column output is obtained through awk, and the disadvantage is that

Shell Scripting--03 Automated Deployment

1. RequirementsServer Master Agent Envtype8.0.0.1 8.0.0.11 8.0.0.111 AAA8.0.0.1128.0.0.12 8.0.0.1138.0.0.1141. Get the list of machines in the document/etc/ansible/hosts[Server][Master][Agent]2. contract to target Machine2.1 Send flask to all

Shell scripting language Operators

In shell programming, operators are essential, and can be said to be used in every script. Familiarity with mastering operators is a basic skill. Comparison operators: eq Equals Ne

Total Pages: 541 1 .... 428 429 430 431 432 .... 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.