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's Learning _spark

Spark Interactive scripting is a simple way to learn about APIs and a powerful tool for analyzing data set interactions. The spark abstract distributed cluster space is called the Resilient Distributed DataSet (RDD) elastic data set. There are two

HBase Common shell command _hadoop

Enter HBase Shell Console $HBASE _home/bin/hbase Shell If you have Kerberos authentication, you need to use the appropriate keytab for authentication (using the Kinit command), and then use the HBase shell after the authentication is successful. You

The use of the If "-e,-d,-f" in the shell under Linux

File expression-e filename true if filename exists-d filename If filename is a directory, true-F filename True if filename is a regular file-L filename True if filename is a symbolic link-r filename If filename is readable, true-W filename if

Shell script Programming Related 1

Definition and use of 1.shell variables my_dir= "/home/yk/desktop"   # ( any character in single quotation marks is output as is, the variable in the single-quote string is not valid;)Echo $my _direcho ${#my_dir} #获取字符串长度2.shell annotations Single

The specified declare of the shell's advanced variable

DeclareSet - R Read-only     -I set shaping     -A array Let the specified function be an array      -F function If used in a script without declare -f any

The shell's parent-child process

January 11, 2017, Wednesday Shell parent-child processStart/execute mode:Current shell: #!/bin/bash must start at the beginning                        the first line of #! Will be discovered by the kernel, is a magic number , the kernel will

"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

Shell Script 3

# Experimental Case One,**Writing sysmon.sh Scripts(1) Use the DF command to extract the disk occupancy of the root partition and assign a value to the variable dug.(2) Use the Mpstat command to extract the CPU usage (Install the SYSSTAT package)

Shell implementation Multi-threaded (multi-tasking)

Implementation scenario: 1. Add:& at the end of the command#/bin/Bashall_num=Tena=$(Date+%h%m%S) forNuminch`seq 1${all_num} ' Do { Sleep 1 Echo${num}}& Doneb=$(Date+%h%m%S)Echo-E"starttime:\t$a"Echo-E"endtime:\t$b"With the & symbol at the end

Shell deletes empty or blank lines in the file.

Today, we found that there are too many empty lines in a file and we intend to delete them. So I used SED and checked the command to write it like this: Sed '/^ $/d' file1 I found that there are still a lot of blank lines in the output content,

Several shell assignments in Linux

1. Find the number of times "Linux" appears in the file sample.txt #! /Bin/bash # How many "Linux" in linux.txt? Grep-o "Linux" linux.txt | WC-lgrep-c "Linux" linux.txt 2. Retrieve the first column (User Name) of/etc/passwd and use "the N

How to obtain random numbers in Shell

From: http://standalone.javaeye.com/blog/511101   1. Use the shell variable $ randomEcho $ random 2. Use Random Functions of awkAwk 'in in {srand (); print rand ()}' 3. Use the System Device File/dev/random and/dev/urandomDd If =/dev/random | OD-

Linux Shell programming from beginner to proficient in exercises answers after class answers (Chapter 8)

This book has no answer. If you send an email to the author, he will not provide the answer. So I had to answer the question myself. Chapter 5 5.1 Q Cai-English-1984-Jiangsu-7 Q Cai-English-1984-Jiangsu-7 Q Cai-English-1984-Jiangsu-7 Q Cai-English-19

Changing the path in Shell

You often need to switch to a common directory, but the path is long and hard to remember. You want to use a script to enter the directory, but it will never change ....... Cause analysis: When the script is executed, only a sub-process is

Shell operations and simple programming (2)

Several Popular Shells Currently, popular shell types include ash, Bash, KSh, CSH, and zsh. You can use the following command to view your own shell types:# Echo $ Shell$ Shell is an environment variable that records the shell type used by the user.

Shell operations and simple programming (III)

Shell Basics The first word entered in the command line must be the name of a command, and the second word is the option or parameter of the command. Each word in the command line must be separated by spaces or tabs. The format is as follows:$

Shell operations and simple programming (4)

Shell special characters Wildcard Wildcard characters are used for pattern matching, such as file name matching, path name searching, and string searching. Common wildcard characters include (*),(?) And the Character Sequence enclosed in square

Total Pages: 541 1 .... 504 505 506 507 508 .... 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.