Linux shell scripts execute in other directories

egFor example, when running rails's own server under Linux, this command is required rails_evn=production rails S is not a bit verbose, every time to hit so many words, can not tolerate, fortunately, we have shell script help. Create a script of

Shell Bulk Add Users

Bored to see a face test, requires the shell script to create 100 users, named: student001...student100:#!/bin/bashfor num in ' seq-w ' Do/usr/sbin/useradd student$num echo ' Password ' |passwd--stdin student$nu MdoneAlso, ask for an account

VMware adjusts shell window resolution under CentOS

Install the Vmware-tools first.Open/boot/grub/grub.conf with VimFind kernel/vmlinuz-2.6.18-308.el5 ro root=/dev/volgroup00/logvol00 rhgb quiet This lineAdd vga=791 kernel/vmlinuz-2.6.18-308.el5 ro root=/dev/volgroup00/logvol00 rhgb quiet vga=791 at

Shell script to read the system running state

Recently in the study shell, eldest brother let write a read system configuration information script as practice and work acceptance, I wrote such a script, read the operating system, kernel, network card, CPU, memory, disk and other information,

Linux command--bash Shell configuration

I. Type of shellIn terms of user login, the shell type is:1. Login Shell: (read environment configuration)Log in normally via a terminal:Su-usernameSu-l USERNAME2, non-logon shell: (do not read the environment configuration)Su USERNAMECommand window

HBase Shell Common Commands

HBase Shell Common Commands:Name-------command expression creates table-------create ' table name ', ' column name 1 ', ' Column Name 2 ', ' Column name n ' Add record-------put ' table name ', ' Row name ', ' Column name: ', ' value ' view record---

Shell Password Expiration detection script

#!/bin/bash#添加计划任务#mkdir-P/scripts/#touch/scripts/passwd_expire_check.sh#vim/scripts/passwd_expire_check.sh#chmod 755/scripts/passwd_expire_check.sh#vim/scripts/passwd_expire_check.sh#01 XX * * */scripts/passwd_expire_check.sh#define Script

Shell Font Color

ECHO-E: Enable conversion of backslash control charactersExample:Echo-e "\033[40;37m Black Bottom white Kongring \033[0m"Echo-e "\033[41;37m Red bottom white Kongring \033[0m"Echo-e "\033[42;37m Green bottom white Kongring \033[0m"Echo-e

Linux Shell programming Variable reference

Shell A total of three reference symbols, double quotes, single quotes and anti-quotes ' (in the English state of the TAB key, 1 keys to the left of the key).Double quotation mark "": References all characters except dollar sign $, anti-quote ' and

Shell Filters Specific Content

Filter email and website address in fileFilter mailboxes (only filter text is displayed):#egrep-O ' [a-za-z0-9.] [Email protected] [A-za-z0-9.] +\. [A-za-z] {2,3} ' file.txt[Email protected][Email protected]Filter website Address:#egrep-O '

Process Control of Linux shell programming

If statement:It used to be a test.Example 1: Notify the manager when the hard drive is over 80%Example 2:apache Auto-restart when closedExample 3: Multi-branch if statementExample 4: Backup etc directoryCase statement:For statement:Bulk

Shell Foundation and Process Control statements case judgment

The Last Post describes the while statement, while the basic use and the dead loop and the file test method, and so on, or that sentence if you want to master all the need to practice many times.This blog introduces the case statement, the

Location parameters of Linux shell programming

The positional parameter is a special variant of the shell that is used to pass parameters to the program when running the shell.$ A indicates the name of the script;$ $ represents the first argument, the sum is the second argument, and so on, when

Shell Basics-2

~ Home directory. Equivalent to the $home variable.~+ the current working directory, equivalent to the $PWD variable.The working directory before ~-, equivalent to the $OLDPWD internal variable.=~ is used for regular expressions, this operation will

Location variables in the Linux shell

For the location variables in the Linux shell, I have always been unable to spit out and swallow, every time I see do not understand, do not understand the Baidu Google, read and forget, is really chronic pharyngitis ah. Now seriously think about it

Linux shell programming Simple shell and Windows file Mutual transformation

What is a shell?LS there a bunch of directories? What is the implementation process? LS is an application, the shell translates it into 01 code to the kernel, the kernel to the hardware, and then back!The shell is also a powerful programming

Linux shell mac address conversion convert with sed, convertsed

Linux shell mac address conversion convert with sed, convertsed Convert 0024. b20b. 693f address to 00: 24: b2: 0b: 69: 3f 1. Separated by dots [Root @ hzswtb2-mpc ~] # Echo "0024. b20b. 693f "| sed-r's/\ B (..) (..) \ B/\ 1: \ 2/g; s /\. /:/G'00:

Linux Command -- bash shell configuration, linuxbash

Linux Command -- bash shell configuration, linuxbash I. shell Type From the perspective of user login, shell types include: 1. logon shell: (read environment configuration) Normally log on through a terminal: Su-USERNAME Su-l USERNAME 2. Non-Logon

Linux shell programming location parameter, linuxshell

Linux shell programming location parameter, linuxshell Location parameters are a special shell variable used to pass parameters to the program when running shell. $0 indicates the Script Name; $1 indicates the first parameter, $2 indicates the

Linux shell programming: simple shell and windows file conversion,

Linux shell programming: simple shell and windows file conversion, What is shell? Ls displays a bunch of directories? What is the execution process? Ls is an application. shell transfers the code 01 to the kernel and the kernel to the hardware.

Total Pages: 541 1 .... 389 390 391 392 393 .... 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.