In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Modify in the previous section:
For I in `seq 0 $# `; do
If [$#-gt 0]; then
Case
Esac
Fi
Review:
$0 the file name of the current script
Parameters passed to a script or function
$# number of parameters passed to the script or function
$* all parameters passed to the script or function
All parameters passed to the script or function by $@. When enclosed in double quotes ("")
Slightly different from $*
$? The exit status of the last command, or the return value of the function
$the current Shell process ID. For Shell scripts, it is the process ID in which these scripts are located
Exercise: write a script showlogged.sh whose usage format is:
Showlogged.sh-v-o-h |-- help
Where the-h option can only be used alone to display help information
The-c option displays the number of all users logged in on the current system
If the-v option is used at the same time, both the number of users logged in at the same time and the number of users logged in are displayed.
Information about the logged-in user; such as
Logged users:4.
They are:
Root tty2 Feb 18 02:41
....
Vim showlogged.sh
#! / bin/bash
#
Declare-I SHOWNUM=0
Declare-I SHOWUSERS=0
For I in `seq 1 $# `; do
If [$#-gt 0]; then
Case $1 in
-h |-- help)
Echo "Usage: `basename $0`-h |-- help-c |-- count-v | 00verbose" `
Exit 0
-v |-- verbose)
Let SHOWUSERS=1
Shift
-c |-- count)
Let SHOWNUM=1
Shift
*)
Echo "Usage: `basename $0`-h |-- help-c |-- count-v | 00verbose" `
Exit 7
Esac
Fi
Done
If [$SHOWNUM-eq 1]; then
Echo "logged users: `who | wc-l`."
If [$SHOWUSER-eq 1]; then
Echo "They are:"
Who
Fi
Fi
Disk Management:
Mechanical hard disk
U disk CD floppy disk hard disk tape
Solid
Partition partition
To create a separate file system
MBR Master Boot record (512Byte for track 0)
Master Boot Record
Main Boot Record
Divide it into 3 segments:
446bytes:BootLoader program
64bytes:
Identify a partition every 16 bytes
2bytes: Magic Number
Whether the tag MBR is valid
Primary + extended partition
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un