: Valid for all usersNormal User:. BASHRC: Valid only for yourself6. Display all files or directories in the/var directory that start with L, end with a lowercase letter, and have at least one digit (can have other characters) appear in the middlels/var/l*[[:d Igit:]]*[[:lower:]]7. Displays files or directories that start with any number and end with a non-number in the/etc directory# ls-ld/etc/[0-9]*[^[:d igit:]]8, display in/etc directory, start with a non-letter, followed by a letter and any
("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>Method Two: seq is a fixed notationIdea: 1. First define a variable i2. Let the value of sum first start with the value of 0,i from 1 to 1001.3. Let I equals a number to remove to 2 if equal to 0, is the number we want to let them add together can get the sum neededVim sum2.sh#/bin/bash#written by Lizheng#about sumLet sum=0For I in $ (seq 1 100); DoIf [$[$i%2] = = 0]; ThenLet sum+= $iFiDon
]$ exitexit[[email protected] ~]# groupmems-l-G VLAN Vlan1 Second, the new files created in the/testdir/data automatically belong to the G1 Group, group G2 members such as: Alice can have read and write permissions to these new files, group G3 members such as: Alice can have read and write access to these new files, group G3 members such as: Tom can only have read access to the new file, Other users (not part of G1,G2,G3) cannot access this folder.[[email protected] testdir]# mkdir-p/da
execution fails, the following command is ignored.
|| : If one command executes successfully in multiple commands, the following command is ignored, otherwise the following command is run.
16. What if you just want to let a user use a variable?VIM/HOME/USERNAME/.BASHRC add a line of export abc=123 and then SOURCE/HOME/USERNAME/.BASHRC17. Which command will be used to list all the variables in the system and the current user defined custom variables?SetThis article is from the "fragrant
1, in the current system create user student Student1 Student2, find the current system named student (must appear at the beginning) of the user's account and related information, the file is/etc/passwdgrep "^student\>"/etc/passwd | Cut-d:-F32, analyze the following text in the/etc/inittab file the characteristics of the first two lines (where the number must be the same in each line), write a pattern that can be found exactly like two lines:11:1:WAIT:ETC/RC.D/RC 113:3:WAIT:ETC/RC.D/RC 3grep "^1
number of files in two files and their total number of rows;650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/73/95/wKioL1YBnRHSiaStAAGLfT_VfkQ251.jpg "/>Run the script test:650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/73/98/wKiom1YBnRGiv43lAAGgZ-kn_IQ195.jpg "/>Exercise 5:Write a script(1) Prompt user to enter a string(2) Judgment:If quit is entered, exit the scriptOtherwise, the string content of its input is displayed650) this.width=650; "src=" http://s3.51cto.com/wyfs
1. Copy the/etc/grub.conf configuration file to the/tmp directory and use the Find replacement command to delete the white space character at the beginning of the/etc/grub.conf file
12
[[email protected] tmp] # cp-sv/etc/grub.conf."/etc/grub.conf" - "./grub.conf"
1
:%s/^[[:space:]]//g
2. Copy the/etc/rc.d/init.d/functions file to the/tmp directory and add a # to the beginning of the line beginning with a white-space ch
#!/bin/sh notifications are explained by bash. If you execute the shell command date in the Echo statement, you need to precede the date command with the symbol ;You cannot execute the file immediately after editing the file, and you need to set executable permissions for the file. chmod +x DateAnother way to do date is to pass it as a parameter to the shell command:Method 3In order to compile and execute the shell program in any directory, we can add the directory where the program is located t
12.11. The qualitative factor is in number theory, the mass factor of a positive integer refers to the integer of prime numbers that can be divisible by the numbers.Two positive integers without a common mass factor are called coprime. The factorization of positive integers gives a series of qualitative factors, after all the mass factors are multiplied. Qualitative factors such as repetition will be expressed as an exponent. According to fundamental theorem of arithmetic, any positive integer h
string s: = Fmt. Sprintf ("%.2f", str)//Remove the decimal part after the var end string if dot: = Strings. LastIndex (S, "."); Dot >= 0 {end = S[dot:] s = s[:d ot]} num: = Len (s) var buf bytes.b Uffer J: = 1 for i:=num-1;i>=0;i--{buf. WriteByte (S[i]) if j%3==0 i!=0{buf. WriteString (",")} J + +} res:=buf. String () var r bytes. Buffer//Invert string for I:=len (res) -1;i>=0;i--{R.writebyte (Res[i])} R.writestri Ng (end) return r.string ()}//Exercise 3.12: Write a function that determines wh
/********************************************************************************* Copyright (C), 1988-1999, Drvivermonkey. Co., Ltd. File Name: author:driver Monkey Version: mail:[email protected] qq:196568501 date:2014.04.02 Description: recursive exercises of a to B integers and **************************************************************************** / #include Integer and (c + +) of A to B of the recursive exercise
100 within the odd andOdd number of numbersEven andNumber of even numbers#include int main (){int i;int sum=0;int sum1=0;int sum2=0;for (i=1;i{Sum=sum+i;}int cnt=0;for (i=1;i{if (i%2==1)cnt++;}printf ("Number of odd numbers within 100 =%d\n", CNT);printf ("100 odd Cycles in number =%d\n", i);printf ("Odd and =%d\n\n\n\n within 100", sum);printf ("100 odd and Average =%d", sum3/cnt3);for (i=2;iSum1=sum1+i;printf ("Even-numbered cycles =%d\n", i);printf ("sum1=%d\n", sum1);return 0;} C language
1, P168A complete terminal output selection menu for the program.#include 1, P171A program that detects keystroke events.#include "Fourth edition of Linux Programming", chapter fifth of the exercises
obviously because of the "only one piece" limit in the title, there is only one wayAnd there are two ways to jump from the middle to the sides.According to the previous idea, here directly BFs knocked up.We're thinking about every ternary group jumping to the middle, there must be a final state.And this final state jumps outward to produce a series of states like binary trees.We'll define the outer jump as a connecting edge to the son state, and the upward bar is defined as the connecting edge
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.