shell操作

Shell进阶脚本70个练习 1.数组的基本脚本 #!/bin/bash name[0]="jacob" # 定义一个数组 name[1]="Rose" # 附加数组 name[2]="Rick" # 附加数组 name[3+3]="TinTin" # 追加数组,相当与在第6位追加 echo ${name[0]} # 打印数组第一个内容 echo ${name[1]} # 打印数组第二个内容 echo ${name[6]} # 打印数组第四个内容或e... 阅读详情

1. 使用case实现成绩优良差的判断


2. for创建20用户
用户前缀由用户输入
用户初始密码由用户输入
例如:test01,test10


3. for ping测试指网段的主机
网段由用户输入,例如用户输入192.168.2 ,则ping 192.168.2.10 --- 192.168.2.20
UP: /tmp/host_up.txt
Down: /tmp/host_down.txt


4. 使用for实现批量主机root密码的修改
成功或失败都必须记录
提示:主机IP存放在一个文件中
SSH:实现公钥认证,执行远程中主机命令
实现公钥认证
# ssh-keygen 在用于管理的主上生成密钥对
# ssh-copy-id -i 192.168.2.3

增加密钥

HBase shell操作 一、HBase常用shell操作 1、进入HBase客户端命令操作界面 $ bin/hbase shell 2、查看帮助命令 hbase(main):001:0> help 3、查看当前数据库中有哪些表 hbase(main):002:0> list 4、创建一张表 创建user表,包含info、data两个列族 hbase(main):010:0> creat... 阅读详情

相关推荐

Win10更新后黑屏只剩鼠标?火绒误杀explorer.exe的5种自救方案(附详细步骤)

本文详细介绍了Win10更新后出现黑屏只剩鼠标的5种专业修复方案,重点解决火绒误杀explorer.exe的问题。从基础的任务管理器操作到安全模式下的系统修复,再到注册表编辑和系统还原,提供了全面的解决方案,帮助用户快速恢复系统正常运行。

weixin_29306571的博客 637

shell编程必备100题

未完待续

lw的博客 2929

使用STM输出互补SPWM波(三相各差120°)

使用STM32输出SPWM波形(三相各差120°)

hello011102的博客 7373

shell脚本入门练习(非常详细)零基础入门到精通,收藏这一篇就够了

linux系统的rm命令太危险,一不小心就会删除掉系统文件。写一个shell脚本来替换系统的rm命令,要求当删除一个文件或者目录时,都要做一个备份,然后再删除。

Python_paipai的博客 3355

验证(uvm常见问题)--子类和父类的句柄和对象问题

sv中的子类和父类 在sv中,有如下两个类,child继承于parent。然后在test module中,正确转换的方法如下面所示。其中c1,c2,p1 都指向了同一个子类的对象c1。总结如下: 一个子类的对象是包括子类的成员变量,方法和父类的成员变量,方法。 子类的句柄c1可以直接赋值给父类的句柄p1,此时p1只可以访问父类的成员变量和方法,或者子类的虚方法,比如下面调用p1.display是...

q876507447的博客 7633

华硕ROG枪神双系统实战:Ubuntu安装避坑指南

本文是华硕ROG枪神笔记本安装Ubuntu双系统的详细避坑指南。针对其独特的硬件与BIOS设计,文章核心解决了VMD控制器导致硬盘无法识别、驱动兼容性等关键难题,并提供了从BIOS设置、分区方案到安装后驱动配置与性能调优的一站式解决方案,帮助用户实现稳定的双系统体验。

raspberrypi5的博客 545

牛客shell编程练习34题带你巩固shell

题目均来自牛客网的shell编程题目

m0_69435474的博客 2081

金融数据自动化:从同花顺API到Excel的智能转换之旅

本文详细介绍了如何利用同花顺API实现金融数据自动化处理,并将其智能转换为Excel格式的全流程。通过Python编程和Excel高级技巧,读者可以掌握从数据获取、清洗到输出的完整解决方案,大幅提升金融数据分析的效率和准确性。文章特别强调了同花顺API的使用技巧和Excel自动化输出的最佳实践。

sql99的博客 462

7.SHELL脚本编程练习

SHELL脚本 1、编写脚本 systeminfo.sh,显示当前主机系统信息,包括:主机名,IPv4地址,操作系统版本,内核版本,CPU型号,内存大小,硬盘大小 2、编写脚本 backup.sh,可实现每日将/etc/目录备份到/backup/etcYYYY-mm-dd中 3、编写脚本 disk.sh,显示当前硬盘分区中空间利用率最大的值 4、编写脚本 links.sh,显示正连接本主机的每个远程主机的IPv4地址和连接数,并按连接数从大到小排序 条件测试 1、编写脚本 argsnum.sh,接受一

Mingo 5068

从零构建智能监控系统:ZLMediaKit与SpringBoot的RTSP流处理实战

本文详细介绍了如何从零构建智能监控系统,结合ZLMediaKit与SpringBoot实现RTSP流处理。通过多协议支持、高性能架构设计及工业级部署优化,解决传统监控方案的兼容性差、延迟高等问题,适用于物联网和智能安防领域。

weixin_29002209的博客 370

Android设置鼠标显示的屏幕

【代码】Android设置鼠标显示的屏幕。

薛文旺 672

常用shell操作及shell管理操作

在HBase中,如果要对海量的数据来进行查询,此时基本的操作是比较无力的。此时,需要借助HBase中的高级语法——Filter来进行查询。Filter可以根据列簇、列、版本等条件来对数据进行过滤查询。因为在HBase中,主键、列、版本都是有序存储的,所以借助Filter,可以高效地完成查询。当执行Filter时,HBase会将Filter分发给各个HBase服务器节点来进行查询。HBase中的过滤器也是基于Java开发的,只不过在Shell中,我们是使用基于JRuby的语法来实现的交互式查询。

m0_63324465的博客 2037

一次点击跑通:用 Postman 自动获取并携带 CSRF token,测试 SAP OData 写操作

SAP OData 写操作自动化测试方案 针对 SAP Gateway OData 服务写操作中常见的 CSRF token 验证问题,本文提出了一套基于 Postman 的自动化解决方案: 问题分析:解释了 CSRF token 的验证机制及其必要性,说明手工测试效率低下的原因 解决方案: 使用 Postman 环境变量存储 token 通过脚本自动获取并传递 token 利用 Collection Runner 实现一键执行 实施步骤: 创建环境变量存储 token 第一个请求获取 token 并存入变

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 307

HDFS的shell操作

HDFS的shell操作(包括查看指定目录信息-ls、查看指定目录下每个文件和子目录的大小-du、移动指定目录或文件-mv、复制指定目录或文件-cp、删除指定目录或文件-rm、)将本地文件系统的文件上传到HDFS指定目录-put、查看指定文件的内容-cat、查看帮助文档-help、创建目录-mkdir、将HDFS的指定文件下载到本地文件系统-ge。本文将对上述HDFS Shell 子命令进行演示和介绍。

2301_76901778的博客 1656

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

shell操作mysql

shell操作mysql       在shell开发中,很多时候我们需要操作mysql数据库(比如:查询数据、导出数据等),但是我们又无法进入mysql命令行的环境,就需要在shell环境中模拟mysql的环境,使用mysql相关命令,本文总结几种shell操作mysql的方法,供大家参考。方案1   mysql -uuser -ppasswd -e"insert LogTable

hbcui1984的专栏 3万+

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

hdfs shell操作

hdfs 的shell 操作

m0_72168501的博客 6786

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

HBase的shell操作

HBase常用shell操作 进入HBase客户端命令操作界面 hbase shell 查看帮助命令 hbase(main):001:0> help 查看当前数据库中有哪些表 hbase(main):002:0> list 创建一张表 创建user表,包含info、data两个列族 hbase(main):010:0> create 'user', 'inf...

写的不好之处,请指教 5719

linux中shell操作,IO操作

txt(这个就是在0-9以file作为开头的文件)( ls file?ls file[1,3,5].txt (查看,file1.txt,file3.txt,file5.txt)echo "hello" >file.txt (将文件覆盖到file.txt文件中)echo "hello">>file.txt(将文件追加到file .txt文件中)ls file[ 1-5 ].txt (查找file 从1到5的文件)一般设备通常为字符设备文件。ls file [ ^3 ].txt (查找file3之前的文件)

m0_75260867的博客 850

MongoDB shell操作

MongoDB shell操作 实验目的 1.了解MongoDB的shell操作语法 2.掌握MongoDB中对数据增删改查的命令 实验原理 MongoDB shell是一个可执行文件,是MongoDB自带的一个交互式JavaScript shell,位于MongoDB安装路径下的/bin文件夹中。要启动MongoDB shell,可执行命令mongo。这将在控制台提示符中启动该shell,MongoDB shell提供了多个命令,下面列出了多个MongoDB shell命令及其用途。 实验环境 Linu

qq_43533693的博客 1633

HBASE的shell操作

HBASE的shell操作Group name: general 通用命令Group name: namespace 进入shell界面(启动hbase客户端): hbase shell 进入客户端后,可以使用help命令来查看命令分组: help 命令分组分为: COMMAND GROUPS: Group name: general Commands: status, t...

u013111855的博客 3022

HDFS 的 shell操作

HDFS的shell操作很多跟linux的shell语法是比较相近,可以很快的学会,本文使用案例,一边演示,一边来学习命令。

wish_you_luck的博客 2608

Shell 操作符

文章目录Shell 操作符SummaryOperatorPractice Shell 操作符 Summary Operator 定义 说明 举例 备注 普通变量 $((运算式)) result=$(((2+5)*5)) $[运算式] result=$[(2+5)*5] `expr 运算式` tmp=`expr 2 + 5` 注意必须有空格 result=`expr $tmp \* 5` 注意*号要转义 Other if [ condition

tina_tian1的博客 2569

HDFS的Shell操作操作

HDFS的Shell操作命令详解

shield911的博客 2102

zookeeper的shell操作

zookeeper的shell操作 要使用shell命令去操作zookeeper之前需要先启动zookeeper。启动命令在之前安装教程中。 启动命令:/export/server/zookeeper/bin/zkServer.sh start 查看启动后的状态:/export/server/zookeeper/bin/zkServer.sh status 1. 启动zookeeper的shell...

xxydzyr的博客 1308

MongoDB的shell操作

实验目的 1.了解MongoDB的shell操作语法 2.掌握MongoDB中对数据增删改查的命令 实验原理 MongoDB shell是一个可执行文件,是MongoDB自带的一个交互式JavaScript shell,位于MongoDB安装路径下的/bin文件夹中。要启动MongoDB shell,可执行命令mongo。这将在控制台提示符中启动该shell,MongoDB shell提供了多个命令,下面列出了多个MongoDB shell命令及其用途。 实验环境 Linux Ubuntu 14.04 jd

qq_45973433的博客 3601

五、ZooKeeper的shell操作

功能,一个典型的发布/订阅模型系统定义了一种一对多的订阅关系,能让多个订阅者同时监听某一个主题对象,当这个主题对象自身状态变化时,会通知所有订阅者,使他们能够做出相应的处理。dataVersion:数据版本号,每次对节点进行set操作,dataVersion的值都会增加1(即使设置的是相同的数据),可有效避免了数据更新时出现的先后顺序问题。事件发生触发监听,一个watcher event就会被发送到设置监听的客户端,这种效果是一次性的,后续再次发生同样的事件,不会再次触发。

zhuyangyong的博客 1380
上一篇: shell练习
下一篇: VLAN实验
陈璆鸣
博客等级 码龄3年 144粉丝 53原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值