How to query the current shell versions and types under the Linux command line

There are several ways to see what shell you are currently using, and the easiest way is to use the shell's special parameters. First, a special parameter named "$$" represents the PID of the shell instance that you are currently running. This

How the Android device installs the full shell tool BusyBox

Due to work needs, often to connect the mobile phone and use the ADB to do some operations, found that the shell function is very good, but in castration state, the most obvious one is, the implementation of a number of commands, the directory

Using Shell to implement batch transform file encoding in Linux

Principle and simplicity: recursion, iconv   code is as follows copy code #!/bin/sh tgt= "Source_rst" Function Fe_convert () {      for file in ' ls $ '     do         if [-D $/' $fi Le]         then        

The Shell Foundation of Linux

Shell BasicsFirst, Shell Overview1) The Shell is a command-line interpreter that provides the user with an interface system-level program that sends a request to the Linux kernel to run the program, allowing the user to start, suspend, stop, or even

Shell with signature request, YII processes signed request

Processing RequestsclassTestControllerextendscontroller{ Public functioninit () {if(!Yii_env_dev) { Throw NewExitexception (201, ' can not access not ' in dev mode '); } } /** * */ Public functionActionclientip ()

Linux Shell Usage Summary

Why do scripts use the./+ script name to execute the scriptUnderstand:Because if the script name is used directly, then the Linux system will go to path path to findsuch as go to/bin usr/bin, such as find, this time will not find the script name,

Shell implementation of multi-level menu scripting

This article mainly introduces the shell implementation of multi-level menu system Installation script instance sharing, this script with multi-level menu to achieve lamp, LNMP installation display effect, the need for Friends can refer to:Hint:

Shell eval Usage

Transferred from: http://blog.csdn.net/w_ww_w/article/details/7075867Eval can read a series of parameters and then execute them according to the characteristics of the parameters themselves. Eval is a shell built-in command that can be used by the

What does "-e,-d,-f" mean in a shell under Linux?

File expression-e filename true if filename exists-d filename If filename is a directory, true-F filename True if filename is a regular file-L filename True if filename is a symbolic link-r filename If filename is readable, true-W filename if

Linux Shell Basics (vii)

16. File Lookup Command find:Here's a sample of the main applications for the Find command:/> Ls-l#列出当前目录下所包含的测试文件-rw-r--r--. 1 root root 48217 Nov 00:57 Install.log-rw-r--r--. 1 root root Panax notoginseng 00:56 testfile.dat-rw-r--r--. 1 root root 1

You can use System to execute complex shell commands in awk

The shell command can be executed directly in awk.[Plain]View PlainCopy [Email protected]:~$ Touch A [Email protected]:~$ Touch b [Email protected]:~$ cat A.txt A B [Email protected]:~$ awk ' {cmd= ' rm ' $0;system (CMD)} ' A.txt

Linux Shell Basics (ii)

Seven. grep family: 1. grep exit Status: 0: Indicates success; 1: Indicates that a matching pattern could not be found in the supplied file; 2: Indicates that the file provided in the parameter does not exist. See the example below: /> grep '

Two representations of logic and in shell

There are two ways to represent logic in bash:(1) [$state = = "Running"-a $name = = "Zone1"](2) [[$state = = "Running" && $name = = "Zone1"]]The second type is supported in Ksh.Instance:#! /bin/-P "pelease input your name:"-P "pleaase Input your

Shell (check return of each line) and Sudoer

Shell result from CmdLineecho $?If 0 then success; else failure(Shell executes each return value, RM-RF error, package cannot overwrite)Solve Sudo:sorry, you must has a TTY to run sudo  a few days ago encountered a problem, call another shell in one

Linux/mac/shell Common Commands

Common commands· LS View the files in the current directory· CD into a directory· CD-Jump back to previous directory· CD ~ Enter the current user's personal directory· PWD Output Current path· mkdir new Folder· Touch New File· Find File· ln

Connector in Shell

(1) Command1;command2Use ";" , the Command2 is executed regardless of whether the Command1 executes successfully.(2) Command1 && Command2When you use &&, Command2 is executed only if Command1 executes successfully, otherwise Command2 does not

Shell Scripting Lesson II ·

The shell file containsThe shell can also contain external scripts in the following syntax format:. FileNameOrSOURCE filenameFor example, create a two shell script.Script 1:test1.sh url = "Www.baidu.com" Script 2:test2.sh .

Python3 implementation--rebound shell

First, demonstrate the effect of rebound shell0. Look at the Python version650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/90/wKioL1hRTinAlo_nAAASu8q0u_A128.jpg "title=" Python.jpg "style=" Float:none; "alt="

Nginx log cutting and deletion of the shell script of historical logs 7 days ago

Example 1,Cut nginx logs by date and automatically delete logs generated seven days ago (logs have been synchronized to dedicated log storage servers, so you can safely delete historical logs .)#! /Bin/bash# InitializationLOGS_PATH =/data/nginx/logs/

Use shell scripts in linux to cut logs for tomcat and nginx

Online servers generally encounter a variety of log cutting. Similar detailed script articles have not been published before. This time, we will make up for the relevant content of the website. The following describes how to cut two logs, and how to

Total Pages: 541 1 .... 305 306 307 308 309 .... 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.