Chapter 1th Overview of Shell programming

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

Shell (13) parameter substitution

Shell parameter substitution xargs. Parameters that generate the command1. Cut-d ': '-f 1/etc/passwd | Head-n 3 | Xargs finger  2. Ask the user before executingCut-d ': '-f 1/etc/passwd | Head-n 3 | Xargs-p FingerIf you press ENTER directly, exit  3.

III. shell variable types and operators

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:

Shell Learning Note 1

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

Shell Basics Learning (v) Test command

1. Numerical test Parameters Description -eq Equals is True -gt is greater than true -lt is less than true -nq Not equal to True -ge

One day a shell

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

Shell script to install JDK under Redhat

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

Ant invoke Shell command (Ubuntu)

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

Shell statistics GMT0 time Zone data

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-

Shell executes three ways

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

Zookeeper Shell operation (reprint)

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

Common tool classes, file and memory size acquisition, shell script execution

/* 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 * *

Job Management in the shell

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:

The shell gets the names of all the folders under the directory and outputs

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

HBase Import Export, hbase shell basic commands.

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

Learn the shell bit by bit

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

Linux timed execution shell

First step: Install crontab, command yum-y install Vixie-cronExtension: Service Crond start//Startup servicesService Crond stop//Shutdown servicesService Crond restart//Restart servicesService Crond Reload//Reload ConfigurationService Crond

Shell simple Use (v) three of the variables

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

HBase shell command

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

Shell (10) sort

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

Total Pages: 541 1 .... 471 472 473 474 475 .... 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.