Some small shell scripts

JudgeProgramWhether it exists, and start its #! /Bin/sh Echo-e "\ 033 [32 m redmine starting \ 033 [0 m"Redmine-2.1.4/CD/u02/Ruby script/rails server webrick-e production-dVar = $ (PS-Ef | grep Ruby | grep-V grep | WC-l)If [$ var-GT 0]ThenEcho-e "\

Array and traversal in Linux Shell

When using shell in Linux, arrays are occasionally used for convenience. The declaration method of the array is: Array = (element1 element2 element3... elementn) That is, wrap the array elements directly with parentheses, and separate the array

One or two shell scripts

Must begin #! /Bin/sh start Start a line of comment # $ # Indicates the number of parameters input by the script $1, $2,... indicates 1st parameters, 2nd parameters ,... Shift is used to move the $ n parameter to the next parameter, which is

Shell metacharacters and shell internal variables

Shell metacharacters and shell internal variables Shell metacharacters > Prog> file redirects the standard output to the file> Prog> file: attaches the standard output to the file.| P1 | P2 uses the P1 standard output as the P2 standard

Pay attention to spaces when writing shell.

Below is a simple Linux ShellCodeThe function is used to find the current directory and all its directories which contain the four characters "html" and print the file name, at first glance, there should be no problem with this code, but there are

Shell Study Notes

Shell scripting is an interpreted language; The essence of shell scripts is an ordered set of shell commands; 1. Basic shell programming process 1) create a shell file 2) grant executable permissions to chmod A + x filename 3) execute the shell file.

Install the bumblebee dual-graphics card driver shell script under fedora 19

Based on the tutorials on the official website, the test is available. Note that you must use the root permission to run the task. #!/bin/bash# This script run the init command for opotimus pc;# Fedora 19;# run as the rootecho 'run as the root'yum

Implement a simple Shell

# Include # include # include # include # include # define maxargs 20 # define arglen 100 main () { char * Arglist [maxargs + 1]; int numargs; char argbuf [arglen]; char * makestring (); numargs = 0; while (numargs { printf ("Arg [

Sorting Algorithm-shell sorting

Shell sorting is a form of change in insert sorting. Because insert sorting compares each element and compares the current element with all the previous elements, in the worst case. Therefore, DL. shell proposed shell sorting in 1959, that is,

Common Linux Shell shortcuts

  Some terminal shortcut keys: CTRL + F Forward one character CTRL + B Move one character behind CTRL + E Move to end of line CTRL + L Clear Screen CTRL + d Delete current

Shell script exercises and Instances

Shell scripts are used to record some exercise questions and shell scripts I have actually written here for learning and querying. User input y or y ends While Mode#! /Bin/bashRead-P "input you choice:" CWhile ["$ C "! = "Y"-a "$ C "! =

Use the Shell find command in detail.

 FindSearch for files or directories. Syntax: Find [directory...] [-Amin ] [-anewer ] [-atime ] [-Cmin ] [-cnewer ] [-ctime ] [-daystart] [-depyh] [-empty] [-exec ] [-false] [-FLS ] [-follow] [-fprint ] [-fprint0 ] [-fprintf ] [-fstype ] [-gid ]

Shell script Learning (1): Shell variables and some common commands

Shell script Learning (1): Shell variables and some common commands Shell allows you to create variables to store data, but does not support basic data type variables (such as int, float .....), shell interprets any value assigned to a

FTP folder transmission shell script

######################################## ######################### ######################################## ######################### Ftp_download_file (){ EchoEcho begin: Download $1: $2...Echo Sleep 0 FTP-I-n Open $1User administratorBinMget

List of Common Unix shell commands

List of Common Unix shell commands Passwd Change User Password PWD print current directory CD change Directory ls list directory file wildcards *,? Any number of characters and a single character file print out the file type cat display

Shell tracking options

If the command "Set-X" is added to the script file, each command executed after the set command and any parameters added to the command line (including the values of variables and variables) will be displayed. A plus sign (+) is added before each

JDK installation in Linux, environment variable settings in different shell environments for different users

  Install JDK in Linux Download the original JDK version of Sun: http://java.sun.com/products/archive/. you can download any JDK of sun. I used to find jdk1.4.2 _ 08 for a long time and I couldn't find it. I accidentally found this portal useful, so

Linux 9 Shell

Course outline 『Shell programming syntaxShell script debuggingShell application instance』A simple shell programShell Structure:1 .#! Specifies the shell for executing the script2. # comment rows3. command and control structureTo create a shell

Linux Shell shortcut

Summary of Linux Shell shortcut operations (including shortcut keys and efficient operations ): CTRL +: Start with the command line CTRL + E: End of the command line CTRL + L: Clear screen, equivalent to the clear command CTRL + u: Cut the content

Linux Shell notes-awk1

One Separator1. Single separator (for example, extract the 11:22:33 string 11 22 33)Echo 11:22:33 | awk 'in in {FS = ":" };{ Print $1 "" $2 "" $3 ;};' 2. Define multiple delimiters (for example, extract string 11 22 33 44 from string 33 & 44)Echo '11

Total Pages: 541 1 .... 445 446 447 448 449 .... 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.