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
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
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,
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: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---
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
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
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
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
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
~ 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
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
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 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
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,
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.
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.