In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use batch processing to judge whether users exist or not. it is very detailed and has a certain reference value. Friends who are interested must read it!
The code is as follows:
@ echo off
Set a =
Set/p a = Please enter the user name you want to find
Net user a% > nul 2 > nul & & echo exists this user | | echo user does not exist.
Pause > nul
Bat description, > nul 2 > nul what is the meaning of some friends may not know, so specially tidy up.
1 > nul indicates that the information of the directory tree will be deleted correctly and forbids the output
2 > nul means that the error message in the process of deletion is prohibited from being output.
> filename > > filename is to save the output of the command to the filename file. The difference between the two is that if the filename file originally has content, delete it, and then save it. The latter is followed by input at the end of the original file.
A more popular explanation
> nul is to mask the display of standard output on the screen, 2 > nul is to screen error display, and > nul 2 > nul is to block the screen display whether it is right or wrong.
The above is all the contents of the article "how to use batch processing to determine the existence of users". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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
© 2024 shulou.com SLNews company. All rights reserved.