Shell Basics use Shell to detect whether a directory exists, there is no prompt for users to create a directory

#!/bin/bashif [ -e $1 ]        then                 echo  "Directory exists"          else        {                          echo  "Directory does not exist, whether create 1 is 2 No"                          read -p  " Please enter 1 or 2: " mulu   

01. Mountains-some useless nonsense about the shell

The shell itself is a program written in C, which is a bridge for users to use Unix/linux, and most of their work is done through the shell. the shell is both a command language and a programming language. as a command language, it interprets and

3rd Chapter Basic Bash Shell commands (2)

Create a fileYou will always encounter situations where empty files are created. Sometimes the application wants a log file to exist before they can write the data. At this point, you can easily create an empty file using the Touch command.Touch

The eval command in the shell

In Shell learning, we encounter these two symbols: anti-quote (') and $ (), what are the differences between them?We all know that in bash, anti-quotes and $ () are used for command substitution, and command substitution is used to reorganize the

Shell programming for file in $*; What does it mean.

$* is a collection of all incoming parameters for the function (script) where this line command is locatedSimilar to [email protected] without quotes, no differenceThe difference is when the "" is amplified."$*" is treated as a string"[Email

Linux Gvim Shell CASE...ESAC statement

#case: ESAC statement: with switch. Case similar, is a multi-branch selection structure#case语句匹配一个值或一个模式 if the match succeeds in executing the corresponding command, if the match does not execute the * command successfully#;; Similar to break, the

Use of shell scripts---cut intercept data

Usage of the Linux Cut commandFont: [Increase decrease] Type: Reprint time: 2013-10-03 I want to commentCut is a selection command that analyzes a piece of data and takes out what we want. In general, the selection of information is usually for

Used in shell programming to determine parameters within an if statement

Http://blog.chinaunix.net/uid/21411227/cid-63616-list-1.html1. Determine the file type –b Returns True when file exists and is block  -C Returns True when file exists and is a character  -D returns True when pathname exists and is a directory  -E

Jenkins automatically deploys MAVEN engineering to server----Ssh+shell

Today's mood is not very beautiful, play jokes may not be so much, or return to the point1. Specify the SSH port, user name, password-related configuration, I do not need to configure the key here what.2. Next time you create a task, SSH

Shell Process Control of Linux shell learning

In the Linux shell programming, the process control structure and the statement, also is the shell script the emphasis, does not understand the friend, follows the script small compilation together to study.Linux control flow structure learning.One,

Shell-awk Advanced Applications

AwkI. Introduction of AWKscripting languageVariable..... Process Control array functions        use awk for Data statistics        1 Number of users in the statistical system, number of built-in users          2 statistics Site Server traffic for

Two scripts to check port conditions under BASH shell

These days need to do Linux TCP port check script, found that netstat, NC command, although good, but not intuitive, and the port is a bit more trouble to check, hands-on learning to do two scripts. One is to check the port condition in the form of

Linux shell handles text most commonly used tools for large inventory

Guide This article will cover the most common tools used by Linux to process text using the shell: Find, grep, Xargs, Sort, uniq, tr, cut, paste, WC, sed, awk, and the examples and parameters provided are the most common and practical. The

Shell Echo Color Example

#!/bin/bash# Test color for scriptRed_color= ' \e[1;31m 'Green_color= ' \e[1;32m 'Yellor_color= ' \e[1;33m 'Blue_color= ' \e[1;34m 'pink= ' \e[1;35m 'res= ' \e[0m 'If [$#-eq 2]Thenecho "Usage: ' basename $ ' content

Various strange symbols in the Linux shell

There was a time when the shell was not written, and today I occasionally see a shell file content. There are some special usage, only feel the impression but can not say the specific function, and then checked. By the way record down, prepare for

The difference between single quotes, double quotes, and no quotation marks in a Linux shell

Single quotes:What you see is what you get: The contents of the single quotation mark are output as-is, or what you see in single quotes is what you output.Double quotes:Output the contents of the double quotation marks: If there are commands,

Shell exercises count the number of words in descending order

Original: https://leetcode.com/problems/word-frequency/Write a bash script to calculate the frequency of each wordinchA textfilewords.txt.For simplicity sake, you could assume:words.txt contains only lowercase characters and space' 'characters. Each

One of the Linux Shell Scripting Learning and combat

1. Create 10 files in the/test directory using a For loop such as: Test-1,test-2,... test-10mkdirsh.sh#!/bin/bashFor i in ' seq 10 'Do[!-d/test] && mkdir-p/testtouch/test/test-$iDonechmod +x mkdirsh.sh2, in the/test directory to quickly create 10

Basic shell commands using notes

Linux Common commands:(LS: List directory contents)-a/-all list all files, including hidden files-L displays details using long format, including rwx(mkdir: Create directory)-p/-parents to create a directory where the upper-level directory is not

36th Spark TaskScheduler Spark Shell Case Run log detailed, TaskScheduler and Schedulerbackend, FIFO and fair, Task runtime local algorithm details

This lesson content:1.      Two dispatching modes of taskschedulerbackend and Schedulerbackend2.     fifo and fair 3.     task allocation of data local resources I. Scheduler run process (Spark-shell angle) 1. Start spark-shell When we spark-shell

Total Pages: 541 1 .... 165 166 167 168 169 .... 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.