2-17 Job database and shell synthesis exercises

1. Use the shell to "12306 User name and password library-do not use Notepad to open the card will die-after decompression can be used word or ultraedit open. rar" All records genetic SQL statements, and then the SQL into the database into a upwd_123

The shell script implements the arithmetic operation and the input cannot be a number that is not a number

#!/bin/BashEcho "Please enter the first number"read aEcho "Please enter a second output"Read Bif[[${b}! = *[!0]*]] && [[${a}! = *[!0123456789]* ]]; ThenEcho "Divisor is 0!!!!!!!!!!!!!!!!! "Echo "and for"`Echo$ ((${a} +${b})) `Echo "difference

Shell script, awk uses NF to calculate the number of lines of text displayed.

Explain:1.awk ' nf{a++;p rint a,$0;next}1 ' file4First of all, the existence of the value of NF, the first row of the second row of the third row of the fourth row is present, the output after execution, after the output hit next, the end of the

Share a shell script that prevents the script from starting repeatedly

One of the requirements of the project: to prevent the script from repeating the schedule, causing the simultaneous runtime to conflict with each other, you need to create a file before the script runs and delete it at the end. When the script

Create a shell with a case statement (function is open, close, reset, display virtual machine)

Create a shell with a case statement (function is open, close, reset, display virtual machine)#!/bin/bashCase "$" inStart)/* When the keyword is start, execute the statement that opens the virtual machineecho Start ...Virsh Start $

The role of the character "&" after running commands in the Linux shell

Morning log in the server compiled to run the service-side program, learned that after the command after the character "&", quit the shell, run the command can continue to run. Puzzled the reason, and to search the following online, understand the

Power Shell Remote Connection

PowerShell Remote Management employs a new communication protocol, Web Services for Management, referred to as Ws-man it works over HTTP or HTTPS, and the implementation of Ws-wan is primarily based on a background service: Windows Remote Management

How to use the Linux shell if condition statement

Shell if-B Returns True when file exists and is a block file-C Returns True when file exists and is a character-D returns True when pathname exists and is a directory-E Returns True when a file or directory specified by pathname is present-F Returns

Code function name extraction and shell review

   #include   #include  int main () { file *in;  file *out;  char c;   int count=0;    puts (" Please ues  in.txt ")     in= fopen (" In.txt ", " R ");     out = fopen ("OUT.txt",  "W");            while ((C = fgetc (in))  != eof)      {          if

Shell features: Command line expansion, variable assignment, and file hierarchy standard (history)

Bash saves a list of previously executed commands by defaultThe current shell's process is saved in the bufferThe commands in the buffer are saved in the file after the shell exits. Bash historyUse the up and down arrows to look over the previously

Shell Statement Rules

One, if condition statementFormat:An IF condition expressionThen #当条件为真时执行以下语句Command Listelse #为假时执行以下语句Command ListFiIf statements can also be nested usingIf condition expression 1ThenIf condition expression 2ThenCommand ListElseIf condition

3rd Chapter Basic Bash Shell commands (2)

Create a fileYou will always encounter situations where empty files are created. Sometimes the application wants a log file to exist before they can write the data. At this point, you can easily create an empty file using the Touch command.Touch

Explanation of the meaning of shell variable $#,$@,$0,$1,$2 in Linux

The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained: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)$- 

Shell Basic Learning (vi) Process Control

1. IfSyntax format for IFif Conditon Then Command1 command2 " commandnfi2. If Elseif Conditon Then Command1 command2 " commandnelse Command1 Command2 "' commandnfi3. If ElseIf elseif Conditon Then

Common comparison operators in shell programming

Conditional judgment statements are not necessary in any program writing, as is the case in shell programming, where the comparison operators that are often used in the shell's test commands are sorted into numeric comparisons, string comparisons,

EXEC command in Shell

1. Find in the -exec Parametersin the current directory ( including subdirectories ), find all txt files and find the string "Bin" containing the the lineFind./-name "*.txt"-exec grep "bin" {} \;in the current directory ( including subdirectories

A shell script that counts CPU memory hard disk usage

A shell script that counts CPU memory hard disk usage for everyone to learn reference#!/bin/bash#this Script isUse fordescrible CPU hard memery utilizationtotal=0Idle=0system=0User=0 Nice=0Mem=0vmexec=/usr/bin/Vmstatwhich SAR>/dev/NULL 2>&1if[$?-ne0]

Shell script to collect Linux network configuration information

This script has been tested under the Centos/rhel and Fedora Linux operating systems.Available for current network configuration

Linux Video Learning 3 (Linux installation, SHELL,TCP/IP protocol, network configuration)

Installation of Linux systems:1.linux System Installation Method three kinds:1. Install the Linux system independently.2. Install the Linux system on the virtual machine.A. Install the virtual machine, basically go all the way down.B. Install

Shell exercises count the number of words in descending order

Original: https://leetcode.com/problems/word-frequency/Write a bash script to calculate the frequency of each wordinchA textfilewords.txt.For simplicity sake, you could assume:words.txt contains only lowercase characters and space' 'characters. Each

Total Pages: 541 1 .... 133 134 135 136 137 .... 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.