当前位置:网站首页>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的设置等
边栏推荐
- 单片机:温度控制DS18B20
- PPOCR 检测器配置文件参数详解
- PCB layout must know: teach you to correctly lay out the circuit board of the op amp
- 双因子与多因子身份验证有什么区别?
- 产品太多了,如何实现一次登录多产品互通?
- 七夕来袭!还要做CDH数据迁移怎么办?来看看DistCp
- FPGA:基础入门按键控制LED灯
- This notebook of concurrent programming knowledge points strongly recommended by Ali will be a breakthrough for you to get an offer from a big factory
- .NET深入解析LINQ框架(六:LINQ执行表达式)
- R语言ggplot2可视化:可视化密度图(Density plot)、可视化多个分组的密度图、数据点分布在箱图中间、添加主标题、副标题、题注信息
猜你喜欢
Leetcode刷题——623. 在二叉树中增加一行
PostgreSQL 2022 Report: Rising popularity, open source, reliability and scaling key
Use KUSTO query statement (KQL) to query LOG on Azure Data Explorer Database
字节一面:TCP 和 UDP 可以使用同一个端口吗?
Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
智能算力的枢纽如何构建?中国云都的淮海智算中心打了个样
Data Middle Office Construction (10): Data Security Management
金融业“限薪令”出台/ 软银出售过半阿里持仓/ DeepMind新实验室成立... 今日更多新鲜事在此...
In-depth understanding of timeout settings for Istio traffic management
今天告诉你界面控件DevExpress WinForms为何弃用经典视觉样式
随机推荐
MMDetection in action: MMDetection training and testing
5G NR 系统消息
Create a Dapp, why choose Polkadot?
2022杭电多校 第6场 1008.Shinobu Loves Segment Tree 规律题
[Android]如何使用RecycleView in Kotlin project
RT-Thread记录(一、RT-Thread 版本、RT-Thread Studio开发环境 及 配合CubeMX开发快速上手)
012年通过修补_sss_提高扩散模型效率
Chapter 4: activiti RuntimeService settings get and get process variables, and the difference from taskService, set process variables when starting and completing tasks [easy to understand]
Common operations of oracle under linux and daily accumulation of knowledge points (functions, timed tasks)
#yyds干货盘点#【愚公系列】2022年08月 Go教学课程 001-Go语言前提简介
#yyds干货盘点#JS数组和树相互转化
Go编译原理系列6(类型检查)
秘乐短视频挖矿系统开发详情
拓朴排序例题
FPGA:开发环境Vivado的使用
60行从零开始自己动手写FutureTask是什么体验?
问题征集丨ECCV 2022中国预讲会 · Panel专题研讨会
第五章:activiti流程分流判断,判断走不同的任务节点
Oracle的自动段空间管理怎么关闭?
PostgreSQL 2022 报告:流行度上涨,开源、可靠性和扩展是关键