Shell script generates a directory tree structure text file--Snippets

For whatever purpose, the script's role is to generate a directory-tree-structured text file that supports Chinese and file directory names with spaces. Like what$./gdt.sh/cygdrive/e/ccccc-oCcccc.txt The/CYGDRIVE/E/CCCCC directory tree structure

Linux shell scripts replace backslash __linux

1 script in Windows, the path is backslash \, in Linux, the path is slash/, you need to replace the backslash with a slash, using the SED command, as followsSed-i "s:\\\:\/:g"/home/pp/install.sql replaces \ sed-i "S:04risk\::ig"

Special symbols commonly used in the shell

The special symbols commonly used in the shell are listed below:   #;  ;;.,/\ \ ' String ' |!   $   ${}   $? $$   $*  \ string\ * **  ?: ^ $#   $@ ' command ' {}   [] [[]] () &nbs p;  (())   | |    && {xx,yy,zz,...} ~   ~+   ~-   &   \\   +-%= 

Shell determines whether a file or folder exists

Shell command to determine whether a file or folder exists, first look directly at the example: #!/bin/sh #判断文件存在 to determine if the folder testpath= "/volumes/macbookprohd/mr.wen/08 shell command" testfile=/volumes/ macbookprohd/mr.wen/08 shell

Black Group Hui Sharp Weapon: peanut shell DDNS intranet penetrate __ Group Hui

There are many intranet users without public network IP, which can not access the NAS of intranet from external network. But if the day in the company did not complete, need to go home to complete or temporary transfer of the home of the NAS data,

qt-window print debug information, local log save, and execute shell script and print the information in the window

Haven't written a blog for a long time, recently work needs to study the following features: 1: Print the Qdebug information to the QT window 2: Save Qdebug information to local 3: Execute shell Script 4: Output terminal information to QT

Conditional judgment statements in the shell If~then~fi

The conditional judgment statement in the shell is an upgrade to the previous "conditional test statement in the shell", meaning that the preceding test statement serves the IF~THEN~FI statement for the current judgment statement. We're still

HBase Shell Basics and Common commands

HBase is a distributed, column-oriented, open-source database derived from a Google paper, BigTable: A distributed storage system of structured data. HBase is an open source implementation of Google BigTable, which leverages Hadoop HDFs as its file

Custom Shell Work Environment

After logging into the system, we are the Shell interaction environment, use it every day to work, have a customized environment can make us more efficient.1.PS1 variableIt is found that there is a string of characters on the left side of the cursor

Linux Learning Nineth Lesson-shell script Programming

Linux Nineth session--------------------------------------------------------------------------------------------------------------- -----------------Program: algorithm + data structureData: The core of the programAlgorithm: How data is

Shell, exit the entire script

General PracticeCat>test.SH"'#!/bin/Bashexit_script () {Exit1}Echo "before Exit"Exit_scriptEcho "After exit"EOFchmodA+x test.SH./test.SHEcho$?# output before exit1You can see that direct use exit can exit the script, and you can pass the error code

Shell Scripting Learning

First, prefaceThe shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.A Shell is an application that provides an interface through which users access the service of

Getopts for shell programming specifying variable values

It is necessary to specify the value of the command line option in the script. Getopts provides a way to place a colon after the option_string option, for example: Getopts abcsd: Option ABCs can be passed without adding actual parameter values,

Install gnome shell and Faenza icon theme in Ubuntu 12.04

It is found that gnome shell 3.4 Is Very dazzling, and it is much easier to use than gnome-Classic. Installation Method: sudo apt-get install gnome-shell After logging out, select gnome to apply the application, instead of "gnome-classic. Install

Linux Shell script programming -- (Linux empty device file and redirection)>/dev/null 2> & 1

Linux empty device file and redirection Output/input redirection>>>&> 2 &> 2 <>>&> & 2 File descriptor (file descriptor), which is represented by a number (usually 0-9.Common file descriptors are as follows:Default file descriptor name0 standard

What is shell?

The main external interface of the operating system is shell. Shell is the outermost layer of the operating system. Shell manages the interaction between you and the operating system: Wait for your input, explain your input to the operating system,

ADB shell dumpsys meminfo view application memory usage

ADB shell dumpsys meminfo The following information is displayed: Currently running services:Meminfo-------------------------------------------------------------------------------Dump of service meminfo:Applications memory usage (Kb ):Uptime: 5712383

Linux Shell script programming-detailed explanation of SCP commands

Linux Shell script programming-SCP command details Command: SCP There are three common methods to copy files between Linux: The first is FTP, that is, one of the Linux installation FTP server, so that another client program using FTP can be used to

Linux mobile phone DIY. Shell application extension 2. automatically generate a playlist (e680 Series)

Linux mobile phone DIY. Shell application extension 2. automatically generate a playlist (e680 Series) Papayas 2007-03-20 I. Origin of the problem Many people ask what is the best player for e680. I just want to say that it is still a built-in

Linux Ubuntu uses shell scripts to monitor the memory usage and CPU usage of a single process

1. Create a monitoring scriptFirst, create an empty document in. Sh format under the folder.Enter a command under the root permission of the terminal to open the. Sh file and edit it.Sudo Vim /*/*...... /**. Sh // press the I key when editing the

Total Pages: 541 1 .... 111 112 113 114 115 .... 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.