Pc1
  • 2024-09-22Linux 中sed命令实现大小写的转换
     001、大写转换为小写[root@PC1test]#lsa.txt[root@PC1test]#cata.txt##测试数据abcDEFHIKLmnOpqM[root@PC1test]#sed's/[A-Z]/\L&/g'a.txt##所有的大写转换为小写abcdef
  • 2024-09-22Linux 中实现文本中所有的单词的第一个字符大写,其余字符小写
     001、[root@PC1test]#lsa.txt[root@PC1test]#cata.txt##测试数据afdfeDETFDSSFFdefexkmxnd[root@PC1test]#cata.txt|awk'{for(i=1;i<=NF;i++){$i=toupper
  • 2024-09-20c语言中什么都不执行的表达式语句
     001、[root@PC1test]#lstest.c[root@PC1test]#cattest.c#include<stdio.h>intmain(void){inti;puts("pleaseinputaninteger.");printf("i=");scanf("%d",&i);intj;
  • 2024-09-15H3C 网络设备定时执行任务
    1、组网拓扑定时执行任务拓扑2、组网需求对Device进行配置,在星期一到星期五的上午八点到下午十八点开启GigabitEthernet1/0/1和GigabitEthernet1/0/2开启端口,其它时间关闭端口,以便起到有效节能的作用。3、配置思路首先确保设备时间的准确性创建关闭GigabitEthernet1/0/1、Gigabit
  • 2024-09-02Linux中 awk命令根据列的索引批量提取列的数据
     001、[root@PC1test]#lsa.txtidx.txt[root@PC1test]#cata.txt0010020030040050060070080090100110120130140150160170180190200210220230240250260270280290300310320330340350360370380390400410420430440450460
  • 2024-08-24异地组网免费工具软件 nowtunnel-wgc 快速免注册
    只有一个键的组网软件,快捷使用无负担。底层wireguard,安全有保障。下载及文档说明:https://www.nowtunnel.com/docs/help-wgc.html软件安装软件运行注意:安装完成后会在桌面及开始菜单中添加快捷方式,非管理员帐号时请使用以管理员方式运行登录连接点击连接开关,成功后
  • 2024-08-19c语言中%f和%lf读入浮点型数据
     001、a、%lf、和%f读入double型值[root@PC1test]#lstest.c[root@PC1test]#cattest.c##测试程序#include<stdio.h>intmain(void){doublei,j;//声明两个double型变量printf("i:");scanf("%lf&q
  • 2024-08-19c语言中用%lf输出double型和float型变量
     001、 测试%lf输出double型和int型变量的差异 [root@PC1test]#lstest.c[root@PC1test]#cattest.c##测试c程序#include<stdio.h>intmain(void){doublei;/*声明doble型和float型变量*/floatj;
  • 2024-08-19c语言中读入整型数据和浮点型数据
     001、读入整型数据[root@PC1test]#lstest.c[root@PC1test]#cattest.c##测试脚本#include<stdio.h>intmain(void){inti;//声明整型变量puts("pleaseinputaninteger.");print
  • 2024-08-14c语言中用整型格式化输出浮点型;还是用浮点型格式化输出整型都是不可行的
     001、整型格式化输出浮点型[root@PC1test]#lstest.c[root@PC1test]#cattest.c#include<stdio.h>intmain(void){doublei;//定义浮点型变量i=5.8;printf("i=%d\n",i);//用整型格式化输出浮
  • 2024-08-08自学网络安全day6
    一、ARP攻击原理但凡局域网存在ARP攻击,都说明网络存在“中间人”。在局域网里面,PC1、PC2、PC3三台主机共同连接到交换机SW1上面,对应3个接口port1/2/3。假设PC3这台主机安装了ARP攻击软件或遭受ARP病毒,成为这个网络的攻击者(hacker),接下来,PC3是如何攻击的?①PC1需要跟PC2通信
  • 2024-07-30程序返回条件的0和1
     001、在linux中如果程序正常执行,则返回0,错误执行返回非0值 [root@PC1test]#lsa.txt[root@PC1test]#cata.txtsfab3534543[root@PC1test]#grep"a"a.txtab[root@PC1test]#echo$?0[root@PC1test]#grep"x"a.txt[root@PC1test]#echo$?1  
  • 2024-07-29c语言中数据的格式化输出
     001、输出整型数据,直接输出[root@PC1test]#lstest.c[root@PC1test]#cattest.c#include<stdio.h>intmain(void){printf("[%d]\n",123);return0;}[root@PC1test]#gcctest.c-okkk[root@PC1test]#lskkktest.c[root@PC
  • 2024-07-28c 语言中 用 %d输出double型数据;%f输出int型数据
     001、%f输出int型数据,其值为0.[root@PC1test]#lstest.c[root@PC1test]#cattest.c##测试程序#include<stdio.h>intmain(void){inti=10;printf("i=%f\n",i);//%f输出int型数据return0;}[root
  • 2024-07-28c语言中给int类型变量赋值double型数值; 给double型变量赋值int型数据
      001、给int型变量赋值double型数据[root@PC1test]#lstest.c[root@PC1test]#cattest.c##测试程序#include<stdio.h>intmain(void){inti;i=8.583;printf("i=%d\n",i);//
  • 2024-07-27c中int型和浮点型的格式话输出
     001、[root@PC1test]#lstest.c[root@PC1test]#cattest.c//测试程序#include<stdio.h>intmain(void){inti=10;printf("i1=%d\n",i);printf("i2=%f\n",i);retur
  • 2024-07-23bash: ls: command not found... Similar command is: 'lz'
     001、环境变量混乱出现如下问题[root@PC1~]#ls##基本命令调不起来bash:ls:commandnotfound...Similarcommandis:'lz'[root@PC1~]#vim~/.bashrc##vim编辑器也调不起来bash:vim:commandnotfound... 。
  • 2024-07-19Linux 中sed命令限制次数匹配
     001、[root@PC1test]#lsa.txt[root@PC1test]#cata.txt##测试数据>Sequence1CCCNTCACTNNNCTTGGNNNNNNNNN>Sequence2[root@PC1test]#sed's/NNN\+//g'a.txt##N至少出现3次删除>Sequence1CCCNTCACTCTTGG>
  • 2024-07-13Linux 中 grep命令仅仅输出匹配的字符串
     001、[root@PC1test]#lsa.txt[root@PC1test]#cata.txt##测试数据aa33aa77bbaaaa22aakkccbbddaauu883388rrqq[root@PC1test]#grep-oP"aa"a.txt##输出仅仅匹配的内容,但是换行了aaaaaaaaaaaa[root@PC1test]
  • 2024-07-11Linux 中awk命令实现将多个连续的字符替换为指定的一个字符
     001、[root@PC1test]#lsa.txt[root@PC1test]#cata.txt##测试数据aabbbbbbccbbwwxxyyzzddjjkkmmss[root@PC1test]#awk'{sub("b+","Q");print$0}'a.txt##将多个连续的b替换为QaaQcc
  • 2024-06-23linux 中 检测后台任务
     001、[root@PC1test2]#lstest.sh[root@PC1test2]#cattest.sh##脚本#!/bin/bashseq10000000000000000000000000000000000000&>/dev/null[root@PC1test2]#nohupbashtest.sh>log_Download2>&1&
  • 2024-06-23Linux 中输出第一个空格或者制表符之前的所有内容
     001、方法1[root@PC1test2]#lsa.txt[root@PC1test2]#cata.txt010203040506070809101112131415161718192021222324252627282930[root@PC1test2]#grep"^\S\+"a.txt##测试数据0102030
  • 2024-06-23Linux 中 grep -P参数的作用
     001、[root@PC1test2]#lsa.txt[root@PC1test2]#cata.txt##测试数据010203040506070809101112131415161718192021222324252627282930[root@PC1test2]#grep"^\S+"a.txt[roo
  • 2024-06-23Linux 中 grep -P 选项 perl正则 限制两侧进行匹配
     001、[root@PC1test3]#echo"Hello,mynameisaming."|grep-P'(?<=Hello,).*(?=aming.)'Hello,mynameisaming. 002、[root@PC1test3]#ifconfig|grep-P'(?<=inet).*(?=netmask)'inet192.168.184.128
  • 2024-06-22【计算机网络仿真】b站湖科大教书匠思科Packet Tracer——实验6 生成树协议STP的功能
    一、实验目的1.验证以太网交换机生成树协议的功能;2.理解网络环路对网络的负面效应;3.理解生成树协议的作用。二、实验要求1.使用CiscoPacketTracer仿真平台;2.观看B站湖科大教书匠仿真实验视频,完成对应实验。三、实验内容1.构建网络拓扑;2.发送报文,理解生成树协议ST