Shell grooming (35) = = = = = = Script for the simulated User login print menu

(a) Print a menu, accept an input, if there is no user to create a user and password, will create a user and password to write to a file, if there is a file to impersonate a user to log in, require the user name arbitrary, can be (^$ ^q), the

About the shell, where is the environment variable placed?

When using the shell, the environment variable file is read./etc/profile: This file sets the environment information for each user for the system, and the file is executed when the user logs on for the first time.and collect the shell settings from

Shell script: Several possible ways to produce random passwords

1. Generate a random password (urandom version)#!/bin/bash#author: Tintin (Jacob) #/dev/urandom file is a Linux built-in random device file #cat/dev/urandom can look inside the content, CTRL + C exit View # After viewing the contents of the file,

Shell finishing (32) = = = Two small examples of nested loops

(1) The shell prints the pattern as shown.650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/07/9D/wKiom1nMh-ygSI1MAAAj5j4UcHs376.png-wh_500x0-wm_ 3-wmp_4-s_3715701053.png "title=" capture. PNG "alt=" Wkiom1nmh-ygsi1maaaj5j4uchs376.png-wh_50

Color display in the shell

by Francis_hao Sep 30,2017Photo from reference "1"This article was authored by Liu Yinghao and licensed under the Creative Commons Attribution-NonCommercial use-Share 3.0 Chinese mainland license agreement in the same way. Welcome reprint, please

"Linux series", "Basic Edition", chapter fourth, the regular expression of Shell Foundation

Regular expressions for 4. shell Basics     4.1  Regular strings are a string of rules          4.1 grep             4.1.1  Format: grep [-cinrvabc]  ' word '  filename             4.1.2 -c //count, indicating number of rows           

Shell---rpm

gpg

[Email protected] src]# RPM-QPL epel-release-latest-6.noarch.rpm # #查询该rpm包安装了什么Warning:epel-release-latest-6.noarch.rpm:header V3 rsa/sha256 Signature, key ID 0608b895:nokey/etc/pki/rpm-gpg/rpm-gpg-key-epel-6/etc/rpm/macros.ghc-srpm/etc/yum.repos.d/

Shell-related knowledge (1)

The Shell's own abilities.Writing scripts is OK, at least now I'm running a script on the InternetProgram-Log scheduled backup and delete, NFS Shanghai volume file Delete and send mail."Data"Export

Shell logical operators, logical expressions

Logical symbols1. about the file and directory of the detection of Logical volume label!- F Common! Detect if "Archive" exists eg:if [-f filename]- D common! Detects if the directory exists- B detection is a "block file"- C detection is a

Basics of Shell programming for Linux Learning notes

Programming languages: Machine language, assembly language, advanced languagesStatic language: Compiler language, features: strongly typed ( variables must be declared before they are used, or even initialized ), and converted to executables.

Shell script execution and configuration files

Linux shell script execution and configuration files Bash Script Execution method:1 interpreter runs/usr/bin/bash bash foo.sh 2 run script with path (requires x permission) chmod +x foo.sh/path/to/foo.sh 3 use. or so The Urce command executes

Considerations for using while loop ssh in the shell

Need to read a text, the second text each line contains an IP in the while loop using SSH, but after the first line of SSH exited, how to avoid automatically reading a line out of the while loop, this article will explain its reasons in

Linux Shell learns a

This blog is referenced from:Http://www.cnblogs.com/waitig/p/5523409.html"Shell from Beginner to mastery" Zhang ChunxiaoShell IntroductionThe shell itself is a program written in C, a user to use UNIX or Linux bridge, most of the user's work needs

Linux Series: Shell script programming

File system1. File system partition structure is divided into Inode group and data domainThe 2.linux file is divided into directories and binary files3. Catalog items are stored in the directory, and the directory entry records the file name and

Linux Shell Programming---Print rows in reverse order

Print rows in reverse orderUse awk or TAC can be done. TAC The name of this command is actually written in reverse. Cat . (1) , using TACThe syntax for this command is as follows:Tac File1file2 ...It can also be used from stdin Read in:$ seq 5 |tac54

See the world from the Shell's eyes

(character) Expandeach time you enter a command, and then pressEnterkey, inBashbefore you execute your command,Bashwill be on the inputThe character completes several steps of processing. We already know two or three cases, how a simple sequence of

[Shell programming] File content case substitution

shell programming often encounters strings, file content-case conversions, and choosing the right commands in different scenarios can improve programming efficiency. Applicable Scenariosfile contents or strings that need to be converted to uppercase

Linux shell directives such as-D,-F,-E, and other judgment expressions

File comparison Operators-e filename true if filename exists [-e/var/log/syslog]-D filename True if filename is a directory [-d/tmp/mydir]-F filename True if filename is a regular file [-f/usr/bin/grep]-L filename True if filename is a symbolic link

Some uses of shell SED

#1, replaceReplace 2017 in #将1. txt file with 2016 display on screenSed "s/2017/2016/g" 1.txtReplace 2017 in #将1. txt file with 2016 display to completely modify the file on the screen, plus I modify the fileSed-i "S/2017/2016/g" 1.txt#Sed读取系统变量,

linux[Basic]-15-Simple shell script [01]

Understanding shell ScriptsThe shell script works in two ways:Interactive: Enter a command that the shell interprets and executes a commandBatch: Write many commands to the shell script, and the shell executes all commands at onceShell a script is a

Total Pages: 541 1 .... 246 247 248 249 250 .... 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.