Some operations after the shell is set to none

Package com.yc.utils;Import java.sql.SQLException;public class Shellutil {    Private Boolean flag=false;    private int xx; The x-axis of the mouse position when you click the interface    private int yy; The y-axis of the mouse position when you

Linux Learning Shell Script

First, write a script, let the user input: 1.first name 2.last name, last displayed on the screen: Your full name is: Content#!/bin/bashread-p "Please input your firstname:" firstnameread-p "Please input your lastname:" LASTNAMEECHO-E "your ful L

Small count (Restricted shell)

If we need to restrict a Linux user to use only the commands we specify, we can use the restricted shell.Use in a normal command environment:Test: # bash-r # Enter the restricted shell# cd/bash:cd:restricted# exitSpecific settings:# useradd test     

SSH anti-brute shell script

Write an SSH anti-violence hack script.The principle is to detect the SSH connection log, filter the login failed IP, more than the number of login to add it into the Hosts.deny file, limit its login.The script is as follows:#! /bin/bashcat /var/log/

Special usage of $0,$?,$! in shell

Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the

Shell Command Collection

CCat Zdd Browse the contents of a ZDD fileCat Zdd1 Zdd2 Browsing the contents of multiple filesCat-n ZDD Browse the contents of a file Zdd and display line numbersCD back to the start directory, that is, just logged into the system directory, CD

Unix Shell Programming Notes series (i)

I. Review of BASIC commandsDate//day and time displayedWHO//view all users logged in to the systemecho//Display the input contentFile Operation classLS//List file listCAT//Display file contentsNumber of words in WC//statistics fileCP//Copy

To interpret variables through shell scripts

Variable assignment, substitution, etc. #!/bin/bash#1. Assigning values to a single variableVariable1=33 #将变量variable1赋值为33Echo ${variable1} # #第一种显示方法为 ${variable1}echo $variable 1 # #第二种显示方法为 $variable 1variable2= "Hello World"

Test usage of shell scripts

#!/bin/bash#1. Integer comparison operators#整数变量和整数常量比较Num1=15["$num 1"-eq] #测试num1是否等于15echo $? # #退出状态为0, means NUM1 equals 15["$num 1"-eq] #测试num1是否等于20echo $? # #退出状态为1, means num1 is not equal to 20["$num 1"-lt] # #测试num1是否小于15echo $? # #退出状态为1,

Reprint Shell Sort

Http://blog.sina.com.cn/s/blog_6d09b5750100x6zg.htmlThe first is the shell sort implementation of multi-column sorting, here to add a vertical line to split, the following file

The face question of the shell

on the Internet to see a test shell problem--the statistics of a folder size greater than 7MB the folder Okay, I'll do it. Deep, personal feel, this problem is the main test of the regular use of the Linux proficiency (I am not very familiar with,

How the shell implements i++ operations and string interception operations

These days there is a bug wrapped around me for half a day, so I have this article.Touch screen because added a notebook keyboard can not be used, take off the notebook keyboard, touch screen can be used again, really ghost.A little research, the

Special usage of shell brackets

The parentheses in the shell have their special usage and are summarized as follows:1. Parentheses after the symbol $${a} The value of variable A to omit curly braces without causing ambiguity.The $ (cmd) command is replaced with the result of the

Settings for Shell script colors

echo display in script with color display, echo display with color, need to use parameter-EThe format is as follows: Echo-e "\033[word background color; text color m string \033[0m"For example: Echo-e "\033[41;36m something here \033[0m" where 41 of

Linux Learning Note Shell (ii)--Automation script

This article references: Shell Scripting Learning GuideThis article reads as follows: Know the shell directive, but do not know how to complete an automated shell script.Because when editing this article, the author is also a novice. So, in some

Let the echo output in the shell script color

Http://www.linuxidc.com/Linux/2014-12/110463.htm#!/bin/bash#定义颜色的变量Red_color= ' \e[1;31m ' #红Green_color= ' \e[1;32m ' #绿Yelow_color= ' \e[1;33m ' #黄Blue_color= ' \e[1;34m ' #蓝pink= ' \e[1;35m ' #粉红res= ' \e[0m '#需要使用echo-EEcho-e

Shell scripts in Linux

▲ Shell ScriptShell Script is to use Shell the function of a program written by this program is to use a plain text file that will some Shell Grammar and instruction are written in, with regular expressions, piping commands and data flow redirection,

Changing the Linux shell foreground and background colors

Set to white on black backgroundEcho-e "/033[037;40m"Color is selected by adding a dedicated sequence-basically a numeric value sandwiched between "/e[" and "M". If more than one numeric code is specified, separate them with semicolons.Echo-e "/e[31;

Linux system security Settings shell script

#!/bin/sh# desc:setup Linux system security# powered by Www.lvtao.net#account setuppasswd-L XFSPASSWD-L NEWSPASSWD-L NSCDPASSWD-L DBUSPASSWD-L VCSAPASSWD-L GAMESPASSWD-L NOBODYPASSWD-L AVAHIPASSWD-L HALDAEMONPASSWD-L GOPHERPASSWD-L FTPPASSWD-L

Shell IFS readLine. sh, ifsreadline. sh

Shell IFS readLine. sh, ifsreadline. sh processLine(){line="$@"echo $line} FILE="" if [ "$1" == "" ]; then FILE="/dev/stdin"else FILE="$1" if [ ! -f $FILE ]; then echo "$FILE : does not exists" exit 1 elif [ ! -r $FILE ];

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.