CRLF line terminators lead to Shell foot report error: Command not found

The line end flags for Linux and Windows text files are different. In Linux, the text file uses "/n" for carriage return, while Windows uses "/r/n" to indicate carriage return line breaks. Sometimes you need to be aware of this when writing shell

Shell Learning Notes

First,shell variables1. There can be no space between the variable name and the assignment symbol.2. The first character must be a letter a~z or a~z.3. Using a defined variable, add ' $ ' before the variable name, such as:Myname= "Firefly"Echo

A shell script for ordinary LaTeX compilation

When using Biber I usually follow the order of Pdflatex→biber→pdflatex→pdflatex, which are not an available option of Many IDEs.#! /bin/bash# # author:luglio# Date: -/ A/ -# Version:0.1.1# # prerequisites# LaTeX suite with Biber, sam2p# settings#

Meaning of "2 > &1" in Shell

Example: nohup/mnt/nand3/h2000g >/dev/null 2>&1 &for & 1 More accurate should be the file descriptor 1, and 1 is generally representative of Stdout_fileno, in fact, this operation is a dup2 (2) call. He standard output to All_result, and then copy

Shell Learning Overview and examples

Shell1) is a scripting language used on the Linux operating system, providing interfaces for user interaction with the system, similar to the command prompt in Windows, but more powerful;2) can be executed by the command line, or it can be edited as

Linux Shell Learning Notes-variable declaration and assignment, looping

Bash variables are non-typed------------------------Unlike other programming languages, Bash does not differentiate between variables"type"In essence, bash variables are strings. But depending on the context, bash also allows comparison operations

Lao Li share: "Linux shell Script Raiders" essentials (eight)

1. Printing process [[email protected] program_test]# PS-E | HeadPID TTY Time CMD1? 00:00:03 Init2? 00:00:00 Kthreadd5 y 00:00:00 migration/06} 00:00:00 ksoftirqd/03 y 00:00:00 migration/04} 00:00:00 watchdog/07? 00:00:00 events/08? 00:00:00 Cgroup9?

Linux Shell multifile content Replace with SED

#!/bin/bash# Linux Shell multifile content replace withsed# Disclaimer: # The source code is mainly the use of two (Chinese and English) with the same key-value pairs of JSON data, the HTML in the Chinese language # Automatic text substitution code.

Shell internal commands and external commands

Shell internal commands and external commandsInternal command: is actually part of the shell program, which is a command executed by the shell itself, usually loaded and resides inside the system when the Linux system loads and runs. External

Shell Yum installs Nginx (for small and medium enterprises without Yum Warehouse)

The part of judgment and inspection can be set or not executed checknginxroot to avoid being subject to permission problems#!/bin/bash#by LCip= ' Ifconfig eth0|awk-f ' [:]+ ' Nr==2{print $4} 'Curl= ' curl-i $IP |egrep "403|200|404" |head-1|wc-l

Li UX Shell arithmetic

I. Arithmetic of integers(1) Use Let expression, no need to add ' $ ' before variableLet sum=num1+num2(2) $[ expression ], before the variable can be added $, or not add $SUM=$[NUM1 + num2] sum2=$[$num 1-5] Sum3=$[num1 + 3](3) $ ( expression ),

Shell Primer-Special Symbols

Special Symbols: *Description: Wildcard character, multiple characters. All files with the suffix ". txt" are listed to[[email protected] 111]# ls *.txt11.txt 1.txt 22.txt 2.txt 33.txt 3.txtSpecial symbols:?Description: Wildcard characters, one

Linux Environment: Shell initialization file, for TCSH, CSH

Tcshell, CshellConfiguration fileGlobal configuration file/ETC/CSH.CSHRCPersonal Profile ~/.CSHRC or ~/.TCSHRCReference:1. Configure your csh/tcsh, https://wiki.freebsdchina.org/howto/c/config_your_csh2. My. CSHRC Common Settings

Shell implementation Shuffle random

Shuffle question: Wash a pair of poker, what good way? Can be washed evenly, and can wash fast? How efficient is the order of chaos relative to a file? On the shuffle problem, there has been a good shell solution, here another three based on the

Shell script: One-click Install lamp, LNMP script

Three days of writing edge test, and finally completed the current longest code script, a total of 253 lines, in 2 machine installation Lamp,lnmp have passed smoothly, the script can be used as a production environment.Where the script needs

Kafka-2.11 Study notes (ii) Shell script Introduction

Welcome to: Ruchunli's work notes, learning is a faith that allows time to test the strength of persistence. Kafka The main shell scripts are[[Email protected] kafka0.8.2.1]$ ll Total  80-rwxr-xr-x 1 hadoop hadoop 

Shell base script execution, command aliases and shortcut keys, etc.

How scripts are executedFor example, we wrote a script under/root/, named Hello.sh. So how does the call execute it? There are two ways to do this:(1) Directly through bash, as follows:Bash hello.shNote: Execute scripts with bash and do not need to

Shell Basic Applications

Experiment (I.)Experimental purpose: Detect system once per minute "The root partition has less than 10G of free space to send warning messages to all terminals. "Experimental requirements: Write a script and automate the script.Experimental

Linux learns some shortcut keys that can be used in terminal and the common wildcard characters used by the shell

CTRL + C Terminal Break programCtrl+d keyboard input end or exit terminalCtrl+s Tentative Current program, pause and press any key to resume operationCTRL + Z put the current program in the background to run, restore to the foreground for command

Linux shell script reads multiple files per line

Existing file1, file2, file3 three files, the contents are as follows$cat File1f1_1f1_2f1_3$cat File2f2_1f2_2f2_3$cat File3f3_1f3_2f3_3Write a shell script to read these three files line by row#!/bin/bashcat file1 file2 file3 |while read P do echo

Total Pages: 541 1 .... 191 192 193 194 195 .... 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.