A shell command to get the count of code lines

The most crude version Shell Code Find. -name "*.java" |xargs wc-l|grep "Total" |awk ' {print $} ' find .-name "*.java" |xargs cat|wc-l #Output: 37634 The above two sentences are the same, but the second one is to use cat to merge the

The shell command parameter in Linux detailed __linux

Command lineWhen users log on to the Linux system, they can see a shell prompt that identifies the start of the command line. The user can enter any commands and parameters after the prompt. For example:    $ date    211 01:34:58 CST 1999    $   

Linux Shell Learning notes 7--here Document__linux

Here document is one of the ways in which you define block variables in bash. The form of the definition is: Command ... ... ... HereIts role can be used to define a variable, the command and the content between here using the way to input to the

Shell string Comparisons

Shell string Comparisons The method of comparison of integers in a Shell and the method of comparing strings, such as equals, not equal to, greater than, greater than or equal, less than, etc. Binary comparison operator, comparing variables or

How to execute shell script under Linux __linux

There are two ways you can execute a shell script under Linux: Note: This article is reproduced from: How to execute shell script under Linux 1, with the shell program execution script: According to your shell script type, choose Shell Program,

The difference between $ (()) in the shell and $ () and ${}

Original address: http://blog.zol.com.cn/2322/article_2321763.html $ () and ' (anti-quote) In the bash shell, $ () and "(anti-quote) are used for command substitution.$ echo the last Sunday was $ (date-d "last Sunday" +%y-%m-%d)Get the date of the

14-shell function

The Linux shell can be user-defined functions and can be called casually in shell scripts.The functions in the shell are defined in the following format:[Function] funname [()]{Action[Return int;]}Description1, can be with function fun () definition,

Linux Shell Example (i)

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

Linux Learning----Basics (shell, command, and VI use)

1, Shell 1.1, IntroductionThe shell is meant to mean "shell", a "shell" program that surrounds the Linux kernel, and all the tasks that the user completes on the operating system are implemented through the interaction of the shell with the Linux

centos6.9 Yum Install Lnmp (shell script)

#!/bin/bashecho "....... ....... CentOS Release 6.9 (Final) ........... ... "echo "############################# nginx ################################"Service Iptables StopYum Install Nginx-yChkconfig Nginx onService Nginx Start &&echo "************

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,

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

What does a double colon mean in a shell script?

This is the code development style, in fact, is a function name, equivalent to the underscore division, but read into the package name after the meaning of different. This is defined in accordance with Google's shell development

Linux Bash shell string split substring etc (RPM)

Original 52779364The problem with script development is that the string splitting operation in the original Java (substring indexof, etc.) does not know what to do (e.g./a/b/c/d.txt I want to know the name of the file)Query information that the

How to write a simple shell script.

The shell itself is a program written in C, which is a bridge for users to use Linux. The shell is both a command language and a programming language. As a command language, it interprets and executes user-entered commands interactively, and as a

Linux shell scripts-variable speed entry and Advanced (2)

1,$$: Displays the current process ID number[Email protected]:~/linux/shell/how_to_use_var$CatShow_pid.SH #!/bin/BashEcho $$Sleep the[email protected]:~/linux/shell/how_to_use_var$ bash show_pid.SH&[1]9401[email

Shell's Export command

Export Feature Description: Sets or displays environment variables.syntax:export [-fnp][variable name]=[variable setting value]Additional Note: when executing a program in the shell, the shell provides a set of environment variables. Export can add,

Lab Three: Shell programming (1)

Shell Command Application Exercise(1) The use of the following documents is briefly reviewed through the Help information/ETC/PASSWD records the user's account/etc/shadow is an optional encrypted password file (view requires sudo

Total Pages: 541 1 .... 138 139 140 141 142 .... 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.