A method for Shell to solve syntax error problem

If there is a possibility of a "^m" symbol in the end of a shell script that uses Windows editing Because MS-DOS and windows are carriage return + line wrapping, so in Linux with Vim to see the code written in Windows VC, after the end of the "^m"

Shell script Programming Basic article--Several special symbols __ programming

* Inverted quotes ' and $ () * Let's demonstrate a comparison of the output results using the inverted quotes and $ () For this result, is because the $ () in $ () has escaped to get this result because of the two \=\ in the inverted

Linux Shell Execution Multi-command && and | | __linux

Today, when writing a shell script, several commands are strung up to execute, and the previous command fails, and the command is not followed. Google on the Internet, find solutions, using logic and && can. Here's a summary of how the shell

Progress bar (Shell)

C. Progress bar prepared by:http://blog.csdn.net/addw1/article/details/55292922 Shell writing #!/bin/bash function Bar () { i=0 bar= ' lable= (' | ') ' \ \ '-'/' index=0 while [$i-le] do #printf ' [%-100s][%d%%][%c]\r '

Crontab and shell scripts to implement Linux timing tasks __linux

The writing of Linux shell scripts VI test.sh #!/bin/bash ################### . /etc/profile . ~/.bash_profile ################## Path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Cd/home/huaxia/syslog2db&&ruby app.rb

Linux shell programming Notes-Background execution command crontab__ block chain

The Backstage execution command, is puts the shell command to the system backstage to execute, does not display in the terminal, does not affect the user to continue to work in the terminal, even if the terminal closes the command also to

Linux Shell Script Learning Introduction notes 3__linux

Today continue the last Find command content, mainly find and-exec and xargs combination and use. (9) The Find command can be combined with other commands with the help of an option-exec. -exec is one of the most powerful features of find. For

Linux Shell Script Introduction Learning notes 1__linux

One: Cat command Cat (CONCATENATE) is one of the commands that the command line player must learn first, and he is usually used to read, display, and splice files, but the cat's ability is much more than that, with a line of commands to combine data

Git shell displays Chinese

Original address: http://www.cnblogs.com/Gukw/archive/2012/01/16/2323417.html 1,/etc/gitconfig:[GUI] encoding = Utf-8 #代码库统一用urf-8 to display Chinese in the Git GUI[i18n] commitencoding = GB2312 #log编码, window under the default gb2312,

Linux shell Programming Notes-understanding sed__ block chain

my first understanding of sed Sed is an editor, a command-style text editor. SED can be executed as a command in a terminal, or it can be saved as a SED script text-an executable sed script file, and then execute the script file. The SED editor,

Shell script Small program in the preliminary-progress bar __ Applet

believe that the progress bar everyone is not unfamiliar, every time you download something or software will be prompted by the current download task to achieve how much, of course, can have different languages to achieve, today I use a shell script

shell+ Timing Task +nginx signal Management implementation log cut storage by date

We renamed yesterday's log 00:00:01 every day, placed it in a specific directory, and then USR1 the information number control Nginx to regenerate a new log file Create a new shell script under directory/usr/local/nginx/logs/runlog.shNote: The file

Spark Shell Startup error problem

Error description: Direct start Spark-shell,pia, error, has been so started, ah, a little wrong. When you are in a bad mood, really want to delete it, and then the next version to use. But think about if the download is also this appearance, then I

Shell Learning File expression

File expression -e filename true if filename exists -d filename If filename is a directory, true -F filename True if filename is a regular file -L filename True if filename is a symbolic link -r filename If filename is readable, true -W filename if

Start HBase hmaster in eclise, play shell

First Master: Parameters: Run the HBase shell hbase Shell Parameters the shell that runs up after HBase Try to run a few orders to find out: Create ' T_person ', ' no ', ' name ' create ' t_person ', ' no ', ' name ' 0 row (s) in 2.

Bash Shell determines if there is a given element in the array

#判断数组中是否有给定元素 #参数: 1 arrays; 2 element #返回: Yes/no # Example: # Determine if there are elements in array Xrsh_array i3 # xrsh_array= (i1,i2,i3) # xrsh_tmp= ' echo ${xrsh_array[*]} ' # Xrsh_arrhasitem ' $XR Sh_tmp "" i3 "# returns YES # Note: The

Digital mini-game under the shell

Rules: a--number pair, position is right b--The result of a, the number is correct, but the position is incorrect. After starting, a systematic initialization of a 4-bit repeatable number, such as "1223". Assuming that the user enters "1234" for the

Shell Common function functions

Checkpid: Check if PID already exists, if one exists, return 0 (by viewing the/proc directory)Daemon: Start ServiceKillproc: Kill a processPidfileofproc: Finding the PID of a processPidofproc: Ditto, use the PIDOF commandStatus: Returns the state of

Common conditions in the Shell to judge

-B file if it exists and is a block special file, True-C file If it exists and is a character special file, True-D file if it exists and is a directory, true-e File is true if it exists-F file is true if it exists and is a rule file-G file is true

Shell Scripting day three-special variables

First, position variables: $ $ Gets the file name of the current execution script, including the script path.$n gets the nth parameter of the current execution script, 1~9, greater than 9, enclosed in {}, for example: ${10}.$# indicates the number

Total Pages: 541 1 .... 430 431 432 433 434 .... 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.