What is login Shell: Login shell can be used by user login, such as/bin/bash,/bin/sh,/bin/csh ... The general Linux Default User shell is bash, which means you can log in and write commands.
Non-logon shell: The classic/bin/nologin is a non-login
These two days, because the work needs to do some of the process of work, look at some of the online examples, mostly through the way of pipeline files to achieve, and then think about it without so much trouble ...
The following is a simple
The use of Find and MV in the shell can do a lot of work.
The easiest way to rename an image file under the current directory is to use the following script:
#!/bin/bash
#文件名: rename.sh
#用途: renaming. jpg and. png files
Count=1
For IMG in
Example:
1.
File_jpg= "Sample.jpg"
name=${file_jpg%.*}
echo File name is $name
File name is sample
2.
File_jpg= "Sample.jpg"
extension=${file_jpg#*.}
Echo Extension is $extension
File name is jpg
3.
File_name= "www.google.com"
Echo
Lattice, as follows:
The code is as follows
[root@myvps1697 201407]# netstat-ntpl|grep sshd|grep-v grep |awk-f: ' {print $} '
In order to solve the problem of space, the 3 of my group have asked all the time, now I know how powerful people, a lot
We will use the common system security configuration as a shell script, only to run this shell script on the server to complete the security settings.
Linux system security Settings Shell script is the second update, has been heavily used in a
In a programming language, a looping statement is one of the most basic syntaxes, and is no exception in the shell (here is bash).This includes the For/while/until loop, as well as the syntax instance of the variable increment.
The loop statements
Shell Introduction
The shell is in the outer layer of the kernel, which is responsible for receiving commands entered by the user, then interprets the command as kernel can understand it, then executes it by kernel, and returns the result back to
Objective
Using the Shell
The basic shell commands and mechanisms are described and explained below.
First: Super Tools/terminals,xterms and Shells
One, Super tool
You've probably heard the argument that the command line (the Mommand lines) is
This is a Unix shell in DOS UNIX format under UNIX.
1, Single File
Dos2unix [Srcfile] > [targetfile]
eg.
Dos2unix Reporter.java > Reporter.java.back
dos2unix-437 Reporter.java Reporter.java
2, Batch File
#!/bin/sh
Filelist= ' Find. -name ' *.
Write a script:
1. Use function to realize:
To determine whether a user exists, the user name passed through the parameters;
If present, the shell and UID of this user are displayed
If it does not exist, it is said that the user does not exist;
There are many kinds of shells in Linux, such as KSH,BASH,CSH and so on.
What kind of shell is used by the current user, we can view it in/etc/passwd
linux-37:/# cat/etc/passwd |grep-i smsweb1--smsweb1 for the user name you want to view
Smsweb1:x:
If you need to get the full path of a selected file, little brother often mechanically copied the path in the shell window, then copied the file name and spelled it after the path. Sometimes the file path is copied for use by the program, which
Job 3:
Requirements are as follows:
Write a script:
1, create a function, you can accept a disk device path (such as/DEV/SDB) as a parameter, before really start the next step to remind users of the risk, and let the user choose whether to
Linux-shell First Lesson1, through a small example to introduce the shell#! /bin/sh Call Sehllecho Print content read input cd jump directory pwd View current directory650) this.width=650; "title=" 1.jpg "src=" https://s5.51cto.com/wyfs02/M00/8D/EA/
Installation of the Linux SendEmail tool 1. Download the file #wget http://files.cnblogs.com/files/sunziying/sendEmail-v1.56.tar.gz2. Installing #yum Install SENDEMAIL3, main parameters:-F is the From, the sender address-t means to, the recipient
1. Weaknesses of Shell variables: weak type and default string type2. Declare command2.1 Declare declaring variable type declare [+/-] [option] Variable name 2.1.1 Declares a numeric type variable: declare-i c= $a + $b # A and B are not declared
ObjectiveIn the Windows environment, organize the code, the code contains the. svn folder, which exists in all controlled directories and needs to be removed uniformly.But not familiar with Windows shell, want to use Linux rm to delete, how to
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