Extracting directory name, filename and extension from the Shell script extraction path in Linux

When writing a script (Shell), you will often encounter the path name, file name, and so on in the filename including the full path. This includes a full path file named /usr/local/apach2/etc/httpd.conf Defined as File=

One day a shell command Linux file Operation series-LN command detailed _linux Shell

In the hint: many of the translation of Ubuntu is literal literal translation, there are many problems, so I suggest you refer to my explanation here. Of course, it was also some of the suspicion of the text, I hope. Often operate on Linux, have a

Shell Script Introduction

1. When a string is used more frequently in a script and the string length is long, you should use a variable instead2. Variables are essential when using conditional statements3. When referencing the result of a command, replace it with a variable4.

Some simple shell commands for HBase

Enter HBase Shell Console$HBASE _home/bin/hbase ShellIf you have Kerberos authentication, you need to use the appropriate keytab for authentication (using the Kinit command), and then use the HBase shell to enter the certificate successfully. You

Linux shell Scripting--Using structured commands (ii)

In a structured command, the most basic type is the If-then statement if Commandthen Commandfibash the Shell's if statement executes the IF line definition of the command, and if the exit status code of the command is 0, then the command in the then

Eight tips for writing a reliable Linux shell script

These eight recommendations come from some of the experience and lessons learned by key writers in writing shell scripts over the years. In fact began to write the time is not only these several, and later thought repeatedly, remove a few irrelevant,

Shell Scripting App (iii)

Security code: Waves will sometimes, straight hanging cloud sail sea Shell scripting App (iii)Foreword: It is difficult to write all the code in sequential order when it is hard to satisfy the requirements when facing various lists and repeating

Shell acquisition Time related commands

Linux Shell gets time and time interval (MS level)Note: While performing some performance testing, sometimes we want to calculate the time a program runs, and sometimes it is possible to write a shell script to facilitate some performance test

Shell scripts Use---if variables to write lamp management scripts

Note that the actual operation should be based on the actual situation of the script to adjust the corresponding1, installation httpdVI apache_install.sh#!/bin/bashRPM-E httpd httpd-manual--nodepsls/root/httpd*If [$?-eq 0];then # #判断是否已经下载了httpdTar

The Linux shell uses the SED command to add characters at the end of a line or at the beginning of a text

Transfer from http://www.cnblogs.com/aaronwxb/archive/2011/08/19/2145364.htmlWriting a script yesterday took 2/3 of the day, and most of the time spent on the SED command, today do not summarize the time of yesterday, I'm sorry.There are several

Shell Write automatic installation script automatically read license and auto input enter

Recently relatively busy, in the company wrote a Centreon+nagios platform source automatic installation script (because the company can not even outside the network, the company Yum source a lot of things are not all, so can only take the source

Mathematical operations in shell scripts

assignments and operations in the shell are string-handling by default, and here are a few special ways to do mathematical operations in the shell. In the future when you can see, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the

[Shell advanced] most bull b Linux shell Command (iii)

1. More friendly display of the currently mounted file system Mount | column-t This command applies to any file system, and column is used to format the output as a list, and the main purpose here is to familiarize you with the usage of

The old boy taught the shell quiz to guess the number game

1, guess the number: first let the system randomly generated a number, give this number to a range (the number of the first 50 and 50), let the user input guess the number, the input judgment, if not meet the number to give high and low hint,

Back quotes, single quotes, double quotes in the Linux shell

The anti-quote bit (') is located above the TAB key of the keyboard, to the left of the 1 key. Note the difference between the single quotation mark (') on the left side of the ENTER key.Plays the role of command substitution in Linux. Command

Shell Learning 35-day----tilde expansion with wildcard characters

Tilde expansion with wildcard characterstwo types of expansion in the shell that are related to file names . The first one is the wave number expansion . , The second type is a wildcard expansion .Wave Number expansion If the first character of the

The shell generates a specified range of random numbers with random strings.

Shell generates a specified range of random numbers and random stringsCategory: Shell 2014-04-22 22:17 20902 People read Comments (5) favorite reports ShellrandomurandomuuidlinuxShell generates a specified range of random numbers and random strings1.

The IF condition of the Linux shell script is judged

If condition judgment1. Basic syntax:if [command]; ThenStatements that meet the criteria for executionFi2. Extended syntax:if [command];thenStatements that meet the criteria for executionelif [Command];thenStatements that meet the criteria for

Shell function, shell array, variable substitution

Defining functionsFunction name {Functional body of a function......}Function name () {Functional body of a function......}How to call a functionName of functionWhat are the rules for using functions?1) first defined and then called, you can only

Using SSH Secure shell for transferring files between Windows and Linux

Install the SSH secure Shell under Windows. There are two shortcuts after the default installation.Need to install Openssh-server under LinuxUtuntu installed by default opens is-client, so do not need to install, but if not installed, then use

Total Pages: 541 1 .... 50 51 52 53 54 .... 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.