Create a text menu create a menu layout
root@wl-ms-7673:/home/wl/Desktop/shell# cat-n test1.sh
1 #!/bin/bash
2 echo-e "\t\tmenu"
3 ECHO-E "1.\tdisplay disk Space"
4 echo-e "2.\tdisplay logged on user"
Q: What is a shell and what is a shell script? The A:shell is a program written in C that is a bridge between the user and the Linux operating system. Users can either enter command execution and use shell scripting to accomplish more complex
When you use the Scrapy Shell to test a Web site, it returns a bad request, so change the user-agent header information and try again.Debug:crawled ( (referer:none)However, how to change it?Use the Scrapy Shell--help command to see its usage:The
AM (Activity Manager) is a tool for managing activity, initiating activity, services, sending broadcasts, and closing windows.start activity:adb shell am start [options] : Can be obtained in the app's Androidmanifest.xml[Options]:-n class name,-a
In shell development, when we connect to FTP or passwd or sudo, we need to enter the password manually. This is obviously inappropriate for automation. And expect's strong interaction model solves this problem. I am involved in this work, the
Bash working features:1. Support Command history, command completion2. Support Pipeline, redirect3. Support Command aliases4. Support for command line editing5. Support Command line deployment6. Support File name wildcard7. Support for using
awk ProgrammingAwk is a programming language. Gawk, is the latest version, the current Linux version is used Gawkawk is a soft link to gawkhow awk works BEGIN #在未读取文件行之前执行Primary input loop, which executes repeatedly until the terminating condition
This article main reference: HTTP://PUBS.OPENGROUP.ORG/ONLINEPUBS/9699919799/UTILITIES/V3_CHAP02.HTML#TAG_18_06_02Other information:http://www.ibm.com/developerworks/cn/linux/l-bash-parameters.htmlThe parameter extension is represented as:
Chapter Three: Basic bash shell commandsThe Bash program uses command-line arguments to modify the type of shell being started
Parameters
Describe
-C string
Read the commands from a string and process them
IntroducedUnderstand The boot sequence of Linux also helps to understand this content, loading the user environment is the last step of Linux boot. Different shells use different configuration files : Bash (. Profile), Ksh (. Profiles), CSH (. Login)
The Until loop executes a series of commands until the condition is true. The Until loop and the while loop are just the opposite of the processing mode. The general while loop is better than the until loop, but at some point it is only rare that
Objective:Add Linux user account, this is relatively simple, in the face of the cluster, many machines, how do we do and implement? This short article, briefly explain some ideas, as far as possible to involve some of the surrounding knowledge
1. Introduction to ArraysUsually define a=1;b=2;c=3, the variables are many, and then a definition of a laborious.Simply put, an array is a collection of elements of the data type arranged in a certain order.An array is a finite element variable or
Google's Chrome OS shortdes a shell environment known as chrome shell, or "crosh" for short. crosh events des several terminal commands that can be used on all chromebooks, even ifdeveloper mode isn't enabled.
Crosh includes commands for connecting
In the Win32 operating system (including Win9x, Windows NT, and Windows 2000), Microsoft not only has a convenient graphical user (GUI) interface, but also retains powerful scalability for the Windows user interface. For the operating environment on
#!/bin/bash( echo "user" sleep 2 echo "passwd" sleep 3 echo "do something in remote device" sleep 3 echo "exit") | telnet IP
The above is non-interactive usage. If you need interactive usage, you can use round CT, and then
1. case... in... esac
The syntax of case... in... esac is as follows:Case $ variable name in"First variable content ")Program Section;;"Second variable content ")Program Section;;*)Other Program Execution segments that do not contain the first
Single quotation marks, double quotation marks, and reverse quotation marks in shellIn shell, there are three types of quotation marks: single quotation marks, double quotation marks, and reverse quotation marks. Single quotation marks 'all
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