[[Email protected] shell] # Cat shift. Sh #! /Bin/bash Until [$ #-EQ 0]; do Echo "the first is: $1 total is $ #" Shift Done [[Email protected] shell] #./shift. Sh 1 2 3 4 5 6 The first is: 1 total is 6 The first is: 2 total is 5 The first
Method for obtaining the process ID by shell:
I know there are three things I have learned and practiced:
PS-A | grep "cmdname" | awk '{print $1 }'
Pidof "parameter name"
Pgrep "cmdname"
The three running results in bash and busybox ash
A lot of balls form a pyramid
Layer X has x * (x + 1)/2 balls.
Give you a second to represent the second ball at the first layer of the pyramid.
The number of rows in the layer at which it is located
Formula 1: x * (x + 1) * (x + 2)/6
Formula 2: x *
#! /Bin/sh # program description # scripts for implementing the tomato working method # tomato working method rules # Rule 1: A tomato lasts for 30 minutes, including 25 minutes of work and 5 minutes of rest. # Rule 2: the time of a tomato is
Tag: Shell
Hup (1) suspended, usually caused by terminal disconnection or user exit
INT (2) interrupt, usually caused by Ctrl + C Combination
Quit (3) exits, usually caused by Ctrl +/Combination
Abrt (6) abort, usually caused by some serious
The custom shell in Ubuntu generally includes the Host Name and file directory. when too many files are opened, the whole shell will become very long, thus affecting the vision.
Enter $ echo $ SP1 in the terminal to know the default shell style, for
Recently, due to project requirements, svnserver is required to be remotely renewed, but there is no fixed domain name or IP address. Therefore, we plan to apply for a free domain name to build a server, and then deploy visual SVN on the server, you
Shell script tracing and debug
Before scripts runs, the most feared problem is the syntax error! So how can we debug it? Is there a way to determine whether there is a problem without directly running the scripts? Haha! Of course! Let's take the
Recently, as the project requires remote access to the svn server, but there is no fixed domain name or IP address, we plan to use a peanut shell to apply for a free domain name to build a server, and then deploy visualsvn on the server, you can
Type COMMAND-env x = '() {:;}; echo vulnerable 'bash-C' echo hello' in your terminal. if your system is vulnerable then abve command will return output like abovevulnerable Hello all the Debian/Ubuntu user to patch it kindly update your Bash to
Remote SCP file by using reverse CT in shell script: Before using reverse CT, you need to install two RPM packages: # rpm-ihv centos/expect-5.43.0-5.1.i386.rpm
# Rpm-ihv centos/expect-devel-5.43.0-5.1.i386.rpm or yum directly download and install
Common shell script interpreters in Unix/Linux include bash, sh, CSH, and KSh. Bash is the most common interpreter in Linux.
Script Language isInterpreted languageWhen executing such programs, the interpreter (Interpreter) needs to read the source
There are a lot of for loop usage in shell. I always want to summarize it. Today I saw a summary of for loop usage on the Internet, which is very comprehensive. So I will turn to research and study...
1. For (I = 1; I 2. Commonly Used in shell is
1. The true and false values in bash are not the values 0 and 1 we generally think.
True and false are built-in shell commands that return logical values. For example:
$ True
$ Echo $?
0
$ False
$
Tag: Shell
Small programs for colleagues
140822,1406181801491716879,221.203.75.168,20140822000014140823,1408051715321587060,101.28.174.242,20140822000127140823,1408051715321587060,101.28.174.242,20140822000129140824,1408051715321587060,101.28.174.24
Single quotation marks, double quotation marks, reverse quotation marks, and shell double quotation marks in shell
In shell, there are three types of quotation marks: single quotation marks, double quotation marks, and reverse quotation
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.