1.shell Introduction
The shell is a special-function program that provides an interface for users to interact with the kernel. It is used to receive commands entered by the user and send it to the kernel for execution.
The shell is an
first, the application of shell variables1. Types of Shell variables·User-defined variables: defined, modified, and used by the user ·Pre-defined variables: Bash predefined special variables that cannot be modified directly·Positional variables:
Knowledge point 1, modify the color of the outputEcho-e "\e[1;31m This is red text \e[0m"Where \e[1;31m indicates that the output is displayed in red, the \E[0M logo resets the color, and 31 can be replaced by a different color value, which is used
Day01Write a script to do the following: Enter a number, and then run the corresponding command. The display command is as follows: *cmd meau** 1---date 2--ls 3--who 4--pwdWhen you enter 1 o'clock, you run the date, enter 2 o'clock to run LS, and so
It's annoying to unload the system following the OPENJDK and then install the orcle jdk every time, soWriting a script execution is a hassle, just put the following bash script and the one you're downloadingThe jdk-7u79-linux-x64.tar.gz package can
Call makefile in Ant and use the make command in the shellXML version= "1.0" encoding= "Utf-8"?> Projectname= "Dy_cike_init"Basedir="."> Targetname= "HAIT_CPR"Description=""> execexecutable= "/bin/sh"> Arg Line= "-C
and a supplier to check the data, the other side is the gmt+0 time zone, our report default Beijing time, can not be modified to GMT0,When you export data in Excel to Excel by hour, and then to a text file, the shell turns to GMT0 for statistics:Pre-
View current ShellEcho $SHELLgrep root/etc/passwdBeginning:#!/bin/bash#!/bin/shls-l/bin/shShell typesCat/etc/shells/etc/init.d/nfs/etc/init.d/crond/etc/init.d/rc.d/rc.sysinitBash--versionThe shell performs three ways:1,sh T.s or Shell
Reprinted from: http://www.cnblogs.com/sunddenly/p/4031881.html2.1.1 Zookeeper Command ToolAfter you start the Zookeeper service, enter the following command to connect to the Zookeeper service:
Zkcli.sh-server localhost:2181
After
/* Copyright (C) The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License") ; * You are not a use this file except in compliance with the License. * Obtain a copy of the License at * *
ReferenceHttp://www.cnblogs.com/ggjucheng/archive/2012/10/21/2733028.htmlAdd a & after the command, such as Firefox &: Background execution.Jobs-l command lists How many commands are currently running in the backgroundCTRL + Z or send signal 17:
Gets the names of all the folders under the specified directory/usr/and outputs:Shell code:1#!/bin/Bash2 #方法一3 dir=$(ls-l/usr/|awk '/^d/{print $NF}')4 forIinch$dir5 Do6 Echo$i7 Done 8 #######9 #方法二Ten for dir inch$(ls/usr/) One Do A[-D
Data import./hbase org.apache.hadoop.hbase.mapreduce.Driver Import table name data file locationHdfsThe data file location can be prefixed file:///Otherwise, the HDFs address is accessed.Data export./hbase org.apache.hadoop.hbase.mapreduce.Driver
1. Get the name of the shell script${BASH_SOURCE-$0}2. Get the path to the shell scriptDirName "${bash_source-$0}"This path is not necessarily the true path of the script, for example, assuming that the command is in
Shell variable Handling1. Variable deletion${var#key} Delete the shortest match from the beginning${var# #key} Delete the longest match from the beginning 2. Variable deletion${var%key} Delete shortest match from tail forward${var%%key} deletes the
1 , first to open HBase, Use JPS View ProcessJPS is the Java Process State tool, which returns the process ID and service name[Email protected]:~/apache/hbase-0.94.15-security$ JPS3082 NameNode6245 Hregionserver3493 Jobtracker6064 Hmaster5999
1. SortA. Sorting strings by default B. With-r option: Reverse sort C. Specify the option data field separator with-T, and the-K option specifies the data field to compare D. Use the-N option to specify "pure digit sorting". As can be seen in 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.