Linux Shell Terminal Chinese garbled

Method One:Modify the/etc/sysconfig/i18n fileChange the lang= "en_US" inside to GB2312.To restart the machine.Without restarting the method, directly# lang= "GB2312"And then we can.Modify i18n just to restart the activeMethod Two:#vi

Configuration file information for Linux shell

Type of Shell:1. Log-in ShellLog in normally via a terminalSu-Su-l2. Non-login shellSuCommand window open under graphical terminalShell scripts that are executed automaticallyBash's configuration file1. Global

How to take the characters in parentheses in Shell

1. Use grep (the result is enclosed in parentheses. I wonder if I can match the content in the brackets only) $ A = 'abc [EDG] adfirpqu '$ echo $ A | grep-O '\[. * \] '# escape [EDG] $ B = 'abc (EDG) adfirpqu' $ echo $ B | grep-O '(. *) '(EDG) 2.

Peid off-pecompact shell 0 basic practice

Recently, I sent a peid shell check tool to everyone. Maybe the newbie doesn't know what this is.Let's take a look at its usage.Peid is now the most popular shell check tool. The so-called "shell" is to put a "shield" on the program, which can be

If judgment in Shell

Tag: String null Integer comparison: -EQ equals to, for example, if ["$ A"-EQ "$ B"] -Ne is not equal to, for example, if ["$ A"-ne "$ B"] -GT is greater than, for example, if ["$ A"-GT "$ B"] -Ge is greater than or equal to, for example, if ["$

Chapter 2. Learning shell scripts Loop)

  While do done, until do done (indefinite loop)   While [condition]   Until [condition] Do program section done   [[email protected] scripts]# vi sh13.sh#!/bin/bash# Program:#Repeat question until user input

Chapter 8 shell learning loop and structured commands

For Loop 1. List for Loop For variable in {list} # For each in C ++/CLR Do ... Done For example: 1. [[Email protected] TMP] # Cat B. Sh #! /Bin/bash For I in 1 2 3 4 5 #1 2 3 4 5 is equivalent to {1 .. 5} Do Echo $ I Done [[Email protected] TMP]

Shell scripts used to disassemble and combine various objects in PDF

Disassembling script header_start=0header_len=15xref_start=$(strings -a -t d $1 | grep -e "\bxref\b" | awk ‘{print $1}‘)trailer_start=$(strings -a -t d $1 | grep -e "\btrailer\b" | awk ‘{print $1}‘)#echo $xref_start#echo

Shell Concurrency Control

Method 1: #!/bin/bashc=0for i in `seq -w 18 31`;do while [ $c -ge 3 ];do c=$(jobs -p |wc -w) sleep 1s done bash run_cal_us_tmp.sh 201407$i & #echo "`sleep 5s`haha" & c=$(jobs -p |wc -w)done Advantages: easy to implement Disadvantage: If

[Ganzhou] shell script for synchronous update of hive data

Introduction:In the previous article, the incremental data in Oracle10g is imported into hive0.13.1, and the master table in hive is updated. http://blog.csdn.net/u010967382/article/details/38735381 describes the principle of incremental update hive

Shell text filtering programming (5): awk printf

[Copyright statement: reprinted. Please retain the Source: blog.csdn.net/gentleliu. Mail: shallnew at 163 dot com] In most cases, the print statement of the awk can complete the task, but sometimes we need more. In those cases, awk provides two well-

Shell script checks the program. If it fails, restart the program.

The script is as follows: #! /Bin/sh # Name of the process to be checked progress_name = "heihu_server" # ------------------------------- # function: checkprogress # function: Check whether a process exists # parameter: $1 --- Name of the process to

Shell collects statistics on the hundreds of counties in each province

The raw data is in the final baiang.txt file. Shell command: Cat ‑qiang.txt | grep-P "^ country | ^ ☆" | awk-F" "'{print substr ($2, 1, 2 );} '| sort | uniq-c | sort-NR The result is as follows: 27 Jiangsu22. Shandong Province18 Zhejiang10 Liaoning7

Shell internal and external commands

Labels: Bash internal and external commands What is an internal command? What is an external command?Internal commands: commands provided by the shell programExternal command: executable program in a path inside the system. The search for

Nginx scheduled switch log (Shell)

1. clearnginxlog. Sh   #! /Bin/bash # Run at 2: 00 am every Nginx_pid = "/run/nginx. PID" Logs_path = "/opt/log/nginx" Logs_date = "$ (date-d" yesterday "+" % Y % m % d ") _ 'date + % Y % m % d % H % m % S '" MV $ {logs_path}/access. Log $

Shell operations of HDFS

Option name Format Description -Ls -Ls View the current directory structure of the specified path -LSR -LSR Recursively view the directory structure of a specified path -Du -Du Measure the file

Shell BASICS (4) arithmetic operations

--- Content from http://www.jb51.net/article/31232.htm By default, values assignment and operations in shell are processed by strings,1. Example of an error methodA)Var = 1 + 1Echo $ VaRThe output result is 1 + 1. Tragedy.B)Var = 1Var = $ var +

What is the difference between $ @ and $ * in shell learning?

What is the difference between $ @ and $ * in shell learning? Before talking about $ @ and $ *, you must start with the positional parameter of shell script...We all know how variables are defined and replaced.However, we also need to know that

What is the difference between shell Learning (and?

What is the difference between shell Learning (and?Strictly speaking, Because 0 is the default value of > This method is used to export data to a file. If the file does not exist, the file is created. If the file exists, the file is cleared.

[Shell] input parameters

[Shell] input parameters Obtain the input parameters of the shell script and the obtained parameters. #! /Bin/bash # title: testPT. sh # atuhor: orangleliu # date: 2014-08-08 # desc: enter two parameters and the second digit. Print them if they are

Total Pages: 541 1 .... 336 337 338 339 340 .... 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.