#include <stdio.h> int main() { //char s[] = {'h','e','l','l','o','\0'}; char s[] = {"hello"}; //这种方式可以省略结尾的\0 printf("%s\n",s);//利用%s参数,可以省略我们自己写循环,一 ...
分类:
编程语言 时间:
2020-06-05 14:59:50
阅读次数:
61
工作中有时会需要用到shell去做并发执行某些需求,提供一个shell模拟进程池的并发脚本,供参考
分类:
系统相关 时间:
2020-06-05 14:43:17
阅读次数:
65
以下Ansible-Ploybook功能: 🚫禁止Root用户登录 lineinfile 模块替换前备份(格式为sshd_config.13019.2020-05-25@17:48:55~) shell 模块支持正则 查看修改后的内容是否有变化 systemd 服务模块(restarted sto ...
分类:
其他好文 时间:
2020-06-05 10:28:14
阅读次数:
165
把下面的代码放到run Script中,感兴趣的,代码不懂的可以学一下shell! # Type a script or drag a script file from your workspace to insert its path. if [ $CONFIGURATION == Release ...
分类:
移动开发 时间:
2020-06-05 10:27:07
阅读次数:
117
shell脚本-awk Linux处理文本工具: grep: 过滤文本内容 sed: 编辑文本内容 awk 显示文本 awk:Aho,Kernighan and Weinberger 报告生成器,以特定的条件查找文本内容,再以特定的格式显示出来 awk命令的格式: awk [option] 'scr ...
分类:
系统相关 时间:
2020-06-05 00:56:45
阅读次数:
117
计划任务 at 可以来做一次性的任务 crontab 同步时间 备份 日志 SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job ...
分类:
系统相关 时间:
2020-06-05 00:50:52
阅读次数:
105
shell脚本-sed Linux处理文本文件的工具: grep 过滤文件内容 sed 编辑文件内容 awk 正则表达式Regex 正则表达式Regex 匹配单个字符的元字符 . [abc] [a-z] [A-Z] [0-9] [a-zA-Z0-9] [^a-z] [[:alpha:]] [[:up ...
分类:
系统相关 时间:
2020-06-05 00:50:35
阅读次数:
293
wget 下载文件 -O filename 指定生成的文件名 -P 保存到指定的目录 -q 静默模式 -r 递归下载 -p 下载所有的html元素 wget http://www.xiaohuar.com/d/file/20190809/small620192446e4599c844fc40a3e7 ...
分类:
系统相关 时间:
2020-06-05 00:44:12
阅读次数:
78
##删除指定元素 使用unset来删除某个数组元素,语法为: unset array[n] 实例 #!/bin/bash program=(c c++ c# h5 java SQL python PHP perl go .net js MATLAB) echo "高级语言有:${program[@] ...
分类:
编程语言 时间:
2020-06-05 00:36:10
阅读次数:
87
题意:给你两个字符串s1,s2;你需要用最小变化次数把是s1变成s2;变化规则如下: 在s1中任意选择k个字符,选择k个字符中字典序最小的si,让k个字符都变成si; #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstrin ...
分类:
其他好文 时间:
2020-06-05 00:30:22
阅读次数:
69