当前位置:网站首页>shell编程流程控制练习
shell编程流程控制练习
2022-08-05 10:57:00 【51CTO】
1、编写脚本 createuser.sh,实现如下功能:使用一个用户名做为参数,如果指定参数的用户存在,就 显示其存在,否则添加之。并设置初始密码为123456,显示添加的用户的id号等信息,在此新用户第一 次登录时,会提示用户立即改密码,如果没有参数,就提示:请输入用户名


2、编写脚本 filetype.sh,判断用户输入文件路径,显示其文件类型(普通,目录,链接,其它文件类型)


3、编写脚本 reset.sh,实现系统安装后的初始化环境,包括:1、别名 2、环境变量,如PS1等 3、安装常用软件包,如:tree5、实现固定的IP的设置,6、vim的设置等

边栏推荐
- Ali's new launch: Microservices Assault Manual, all operations are written out in PDF
- 第七章,activiti个人任务分配,动态指定和监听器指定任务委派人「建议收藏」
- Oracle 19.3 restart 环境
- 微信小程序标题栏封装
- 例题 可达性统计+bitset的使用
- 数据可视化(一)
- 图像分割模型——segmentation_models_pytorch和albumentations 组合实现多类别分割
- [Android]如何使用RecycleView in Kotlin project
- Chapter 5: Multithreaded Communication—wait and notify
- 化繁为简!阿里新产亿级流量系统设计核心原理高级笔记(终极版)
猜你喜欢

Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)

The host computer develops C# language: simulates the STC serial port assistant to receive the data sent by the microcontroller

登录功能和退出功能(瑞吉外卖)

用KUSTO查询语句(KQL)在Azure Data Explorer Database上查询LOG实战

MySQL 中 auto_increment 自动插入主键值

工程设备在线监测管理系统自动预警功能

PostgreSQL 2022 Report: Rising popularity, open source, reliability and scaling key

How to choose coins and determine the corresponding strategy research

FPGA: Use of the development environment Vivado

Opencv图像缩放和平移
随机推荐
How to choose coins and determine the corresponding strategy research
The query that the user's test score is greater than the average score of a single subject
HDD杭州站•ArkUI让开发更灵活
如何测试一下现场的备机失败,转发主机的场景?
#yyds干货盘点#JS数组和树相互转化
MMDetection实战:MMDetection训练与测试
数据可视化(二)
19.3 restart the Oracle environment
Oracle的自动段空间管理怎么关闭?
Leetcode刷题——623. 在二叉树中增加一行
自定义过滤器和拦截器实现ThreadLocal线程封闭
支持向量机SVM
单片机:温度控制DS18B20
Dynamics 365Online PDF导出及打印
SkiaSharp 之 WPF 自绘 投篮小游戏(案例版)
012_SSS_ Improving Diffusion Model Efficiency Through Patching
Google启动通用图像嵌入挑战赛
Nature:猪死亡1小时后,器官再次运转
poj2935 Basic Wall Maze (2016xynu暑期集训检测 -----D题)
化繁为简!阿里新产亿级流量系统设计核心原理高级笔记(终极版)