The CentOS shell command line only shows that the-bash-4.1# does not show the user and path resolution

 today accidentally hit the home directory Delete command, although finally for a variety of reasons did not delete, but the home directory, many files and directories are deleted, and the command line does not display the current user and path.

function return value in shell

1. PrefaceAlmost half a year did not write a blog, wasted a long time, work in the chores too much, their own more and more lazy. In order to spur their own growth, or to insist on writing a blog, record their growth.2. Shell Function

Linux Shell Script Raiders (1.1)

1.1 Introduction The design of many Unix-like operating systems is breathtaking. Even today, decades later, UNIX-style operating system architectures are still one of the best designs ever. One of the most important features of this architecture

Shell command-line arguments

1, $* and [email protected] DifferenceCat a.sh#!/bin/bashFor i in $* #这里换成 [email protected] same resultDoEcho $iDoneSH a.sh 1 ' 2 3 '123VI a.shFor i in "$*"...SH a.sh 1 ' 2 3 '1 2 3VI a.shFor i in "[email protected]"...SH a.sh 1 ' 2 3 '12

The variables of shell learning

A variable definition1 explicitly defined variable=xxx no spaces2 Read variable ReadingThe following two lines of code are written, reading name and namefamilyRead-p "Please input your name:" NameRead-p "Please input your whole name:" Name familyRun

Shell example of skipping password authentication with expect

#!/bin/bashlocal_dir= '/tmp/test_huadan ' ip= ' 192.168.0.221 ' password= ' Lhm0125 ', des_dir= '/tmp/test_huadan ' list=$ ( Find $Local _dir-cmin-60) for i in $List do#echo $i if [-f $i] then expect This article is from the "Python" blog, so be

Determine if a string is empty inside the shell

determine if a string is empty inside the shell Category: Linux shell2011-12-28 23:18 15371 people read reviews (0) favorite report ShellThere are several main ways to do this:echo "$str" |awk ' {print length ($)} 'Expr Length "$str"echo "$str"

Learn Shell notes (day1)

Recently the company is not very busy, so the idle time to read more about the shell of some things, because in the development test under Linux, know something about the shell is very helpful to yourself.about what a shell is, a shell of Linux that

Basic Grammar of Linux-shell programming

Characters that use double quotesDouble quotes are an important part of the shellecho Hello echo"Hello World" Hello WorldHow to display: Hello "World"is the following command OK? $ echo "Hello" World ""Correct method: echo "Hello \"

Shell programming Conditional judgment----use case ... ESAC judgment

Conditional judgment----Use case ... ESAC judgmentCase $ variable name in "First variable content") Program Segment;; "Second variable content")Program Segment;;*) Other program execution segments that do not contain the contents of the first

Special characters for Shell scripts

1. #注释作用, #! Except in addition, in the parameter replacement echo ${path#*:} here does not represent the comment, the numeral conversion, does not represent the comment echo $ ((2#101011)) 2. Command line delimiter, you can write multiple commands

Shell Displays color output

Format: Echo"/033[Word background color; font color m string/033[control code"If you simply display the font color can be fixed control code bit 0m. Format: Echo"/033[Word background color; font Color m string/033[0m"Word Background color range:40-49

Linux Shell Learning awk---beginner's notes

Pattern of 1.AWKBEGINENDexpression Example: nf>10 or/^a//regular expression/?You can use a/^a/like this.Another way of writing $ ~/^a///Field matchBetween expressions you can use && | | !?: Operators do Boolean operations (which can be regular

String manipulation in the shell

String in Shell: string is the most commonly used and most useful data type in shell programming (in addition to numbers and strings, no other type is easy to use, haha), strings can be in single quotes, or double quotes, or without quotes. The

Use the shell to count the number of occurrences of the Top10 URL (not found in the blog Park, special Turn)

transferred from: http://blog.csdn.net/guaguastd/article/details/8332757use the Shell to count the number of occurrences Top10 URLsCategory: Shell scripts 2012-12-19 17:17 286 people read reviews (0) favorite reports Ranking of

Ubuntu Shell Scripting Coding issues

Today, a colleague is writing a database backup shell script, in the case of several times to determine the script code is correct, found that the results of the script output is not normal./* * * @author Jenkihuang * @email [email protected] *

Sun Qiqung accompany you to learn--how to assign the return value of a shell command to the application's variables

How to assign the return value of a shell command to an application's variable.Bo Master recently made a router project, need to get the router now network status and parameters, using the UCI get GET,However, with system ("UCI get"), the obtained

Getting Started with Shell scripting basics

Bash Script programmingOne, Bash script programmingBash script programming (can be understood as a stack of commands)Program: Contains statements and expressions (with judgments and loops)Sequential executionSelect ExecuteLoop executionprogram =

Special characters of shell scripts

Special characters of shell scripts1. # comment ,#! Besides, echo $ {PATH # *:} parameter replacement does not represent annotation, numeric conversion, and echo $(2 #101011) 2 .; command Line separator. Multiple commands can be written in one line.

Test and content replacement of shell variables, replacement of shell Variables

Test and content replacement of shell variables, replacement of shell Variables Reference: laruence's private house dish-Linux BASICS (Third edition). In Chapter 11th of the Linux BASICS (Third edition, the final example illustrates '-', '=', and '

Total Pages: 541 1 .... 271 272 273 274 275 .... 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.