Basic knowledge of shell scripts 1: compilation of basic scripts

1. Use multiple commands To run multiple commands together, you only need to input them to the same line, separated by semicolons. Ex: data; WHO 2. Create a script file (1) #! /Bin/bash is the first line (2) # Add comments. (3) Each line

Use shell commands to stop or run the service-Service

Use shell commands to stop or run services --- Service # Service xinetd stop // stop running the xinetd service Stopping xinetd: # Service xinetd start // start the xinetd service Tip: sometimes when we use Linux for Internet access, we cannot

Several groups of Shell-written progress bar programs

1. Add the $ symbol:#! /Bin/shEcho | awk '{printf "^) ^", $1 }'While sleep 1DoEcho "$" | awk '{printf "% s", $1 }'Done   2 changed sticks:#! /Bin/bash I = 0While [$ I-lt 10]DoFor J in '-''//'' | ''/'DoEcho-ne "/033 [1D $ J"Usleep 50000Done(I ++

Function inheritance in Shell

we know that variables are inherited by quilt processes, it can be used directly. In some cases, you may need to inherit functions to facilitate transparent use. The method is very simple. Use "Export-F". Pay attention to the parameter "-F", which

Erlang shell debug debugging

Reprinted: http://langzhe.iteye.com/blog/671762     Prerequisites: the Erl file must be compiled using the debug_info option. Otherwise, the invalid beam file or no abstract code will appear:Error Compilation Method: Make: All ([debug_info]). |C

Safety Shell of Unit 1, Unit 3, nuclear power plant may be damaged

Beijing, March 16 (Xinhua)-the safety shell of nuclear reactors 1 and 3 at Fukushima 1st nuclear power plant may be damaged, Kyodo News reported, japan may need assistance from the US military. Yoy Nakano said Japan may seek help from the US

Shell script learning-1

1. write scripts. You can use shell and Perl. Find 100 files starting with ABC in the/tmp directory, and save the first line of these files to file new.2. write scripts and use shell and Perl. Put all the rows in file B but not in file,Save as file

Makefile & shell

The following are all from network collection. I sorted it out myself and only sorted out some things that I was not familiar with before, but will be used now:I. Definition of variables in makefile:1. recursive expansion: the variables defined by

Shell note01: some shell combinations

Some shell combinations CTRL + L: Clear the screen CTRL + W: delete the word starting at cursorCTRL + u: Clear the line I. e. Delete the all words from Command LineTab: auto-complete files, directory, command names and much moreCTRL + R: search

"$ ()" In Linux Shell bash variable assignment

Reprinted: http://www.360doc.com/content/10/0303/16/155970_17438894.shtml Example 4-2. Simple variable assignment 1 #! /Bin/bash 2 # "naked" variable 3 4 Echo 5 6 # When is the variable "naked", such as when the front side is less than $? 7

Shell condition judgment Summary

-B file: if the file exists and is a special block file, it is true.-C file: if the file exists and is a special character file, it is true.-D file: if the file exists and is a directory, it is true.-E file: true if the file exists-F file: if the

A script for Tomcat to create an instance (shell script)

  #! /Bin/bash Tc_home =/opt/Oracle/tomcat/ InstanceName = $1 [created instance]   CD...>/dev/null Template_dir = 'pwd' Echo $ template_dir If [! -D $ tc_home]; then Mkdir-p $ tc_home [Create if the directory does not exist] Fi   Usemethod

Shell scripts syntax

Shell scripts are similar to the C language and also have a fixed language format. in short, shell scripts are like batch processing files (. BAT), the most basic function is to write a lot of commands together, so that users can easily execute a

Shell memo for querying user information in Linux

Author:North SouthSponsorship:From:Linuxsir. orgAbstract:This document describes several tools used in user management, including ID, finger, groups, W, WHO, and users; Directory Index 1. Principles of user query tools; 2. user and group query

A self-written shell script for automatic formatting, mounting upon startup, creating users and managing ACL Permissions

  At noon yesterday, after finishing learning ACL and mounting, I tried to write a small script. Suppose a group develops a project and needs to create a project group with three users and a shared folder, to prevent mutual modification or even

Shell script learning: Step-by-Step Basic awk statements, until loops, and test statements

Awk origin: awk statements are a set of languages developed by three researchers at Bell Labs in 1970s. awk names are the names and letters of the three researchers. However, awk was initially not intended for users, but for individual users.

Common system variables and condition judgment in Shell

Common System Variables$0 name of the current program$ N the nth parameter of the current program, n = 1, 2 ,... 9$ * All parameters of the current program (excluding the program itself)$ # Number of parameters of the current program (excluding the

Shell script learning Summary

1. system environment variables after the user logs on to the system:$ Home user's own directory$ Path: the directory to be searched during Command Execution$ TZ Time Zone$ Mailcheck the number of seconds to check whether a new letter exists$ PS1

ADB shell dumpsys

Http://blog.csdn.net/wike163/article/details/7289586 Android has an interesting command calledDumpsysTo dump some system information. Even described on ADB manual IThink that some points shocould be reinforced. In order to get the complete status

System Monitoring: use shell to monitor the FTP service and use Feixin to send SMS alerts

#! /Bin/shlang = zh_cnsendmsgfile =/home/LSC/fetion/install/cmd.txt send_sms_mobile_telephone () {log_time = 'cat ftpstat_time 'local_time = 'date + % s' n =n ($ {local_time}-$ {log_time })) if ["$ N"-GT "1800"]; then # is more than 30 minutes away

Total Pages: 541 1 .... 533 534 535 536 537 .... 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.