导航

上一页 1 2 3 4 5 6 7 8 ··· 13 下一页

2021年7月20日 #

fscanf

摘要: 太久没有用scanf,今天遇见一个报错,说%x匹配的是unsigned int *,我都懵了,还去查了百度,printf需要的是unsigned int,scanf需要的确实是unsigned int *,因为要对变量赋值,哈哈哈哈。 今天遇到的问题是,读取的字符串包含空格,本身已经用""括起来,但 阅读全文

posted @ 2021-07-20 16:32 toughcactus 阅读(180) 评论(0) 推荐(0) 编辑

2021年7月19日 #

geoIP C 数据库查询

摘要: 国家简码查询 https://blog.csdn.net/weixin_30702413/article/details/99026742?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMa 阅读全文

posted @ 2021-07-19 13:57 toughcactus 阅读(51) 评论(0) 推荐(0) 编辑

2021年7月16日 #

centos执行脚本遇到^M无法解析(适用于所有linux 吧)

摘要: 不是批量生效,估计要改vim的source。 vi该文件 :set ff? 可以看当前格式,dos或者unix :set ff=unix 将文件强转为unix即可 阅读全文

posted @ 2021-07-16 09:52 toughcactus 阅读(189) 评论(0) 推荐(0) 编辑

2021年7月15日 #

centos安装python re

摘要: https://blog.csdn.net/u012014531/article/details/103627462 上回安装python,折腾到好晚,那天缺openssl的版本,以及python3执行要加sudo。 其实那台服务器上本来就装过openssl。 今天新来一台服务器,装python的时 阅读全文

posted @ 2021-07-15 16:38 toughcactus 阅读(51) 评论(0) 推荐(0) 编辑

2021年7月13日 #

函数传参 数组: 放弃了,读全局变量

摘要: $cat gg.sh #! /bin/bash group1=([0]="apple orange" [1]="pear")group2=([0]="apple orange" [1]="pear") function gg() { tmp=$1 echo ${tmp[0]} echo ${tmp[ 阅读全文

posted @ 2021-07-13 18:21 toughcactus 阅读(29) 评论(0) 推荐(0) 编辑

2021年7月9日 #

ubuntu netplan 设置路由

摘要: https://my.oschina.net/u/4173440/blog/3109177 https://netplan.io/examples/#reaching-a-directly-connected-gateway https://blog.csdn.net/weixin_34194379 阅读全文

posted @ 2021-07-09 17:15 toughcactus 阅读(771) 评论(0) 推荐(0) 编辑

shell字符串拼接2,作为结果传递参数

摘要: 打印日志需涵盖很多固定输出,所以我shell输出调用函数,也就是把特定字符串传给打印函数 存在一个问题,就是字符串包含空格时,只输出第一个空格前的内容。我盲猜,可能作为多个参数了。 不作为函数参数时,可以正常输出 $cat aaa.sh #! /bin/bash pack="" tmp1="appl 阅读全文

posted @ 2021-07-09 15:58 toughcactus 阅读(631) 评论(0) 推荐(0) 编辑

2021年7月8日 #

centos安装python

摘要: https://blog.csdn.net/u012014531/article/details/103627462 curl https://www.openssl.org/source/openssl-1.0.2g.tar.gz | tar xz && cd openssl-1.0.2g && 阅读全文

posted @ 2021-07-08 16:42 toughcactus 阅读(818) 评论(0) 推荐(0) 编辑

ubuntu装机设置

摘要: 我真的是每年都会总结这个。 1.远程的话,安装openssh-server 2.设置ip:每个冒号后都有空格;新起行空两格 https://blog.csdn.net/qq_25697555/article/details/103178987 vi /etc/netplan/01-network-m 阅读全文

posted @ 2021-07-08 15:23 toughcactus 阅读(72) 评论(0) 推荐(0) 编辑

2021年7月7日 #

shell的按位与

摘要: 在c程序里对32位实现按位与和移位特别方便,所以设计了一个字段由3个语义组成。 用脚本处理数据时,也阔以。 #4 100 #3 011 $echo $((4 & 3)) 0 # 5 1001 # 3 011 $echo $((5 & 3)) 1# 19 0010011#83 1010011$echo 阅读全文

posted @ 2021-07-07 10:43 toughcactus 阅读(799) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 13 下一页