08 2022 档案
摘要:users = [ {"name" : "dewei"}, {"name" : "xiaomu"}, {"name" : "asan"} ] users.sort(key=lambda x : x['name']) print(users) # [{'name': 'asan'}, {'name':
阅读全文
摘要:字符串转列表函数 -- split c = 'a|b|c|d' print(c.split('|')) #['a', 'b', 'c', 'd'] print(c.split('|',1)) # ['a', 'b|c|d'] f = 'a~b~c' print(f.split('~')) #['a'
阅读全文
摘要:#include <stdio.h> #include <unistd.h> int main(){ printf("the pid is %d\n",getpid()); return 0; } gcc -o gotTest main.c readelf -a gotTest 可以得到如下结果:
阅读全文
摘要:cut grep "/bin/bash" /etc/passwd root:x:0:0:root:/root:/bin/bash wj:x:1000:1000:wj,,,:/home/wj:/bin/bash grep "/bin/bash" /etc/passwd | grep -v "root"
阅读全文
摘要:1.shell中变量类型默认是字符串,这点和和C/C++/JAVA/Python不同。 echo $a 输出为空。 有2种结果: 1.没有定义变量a 2.定义了变量a,但是变量a没有任何值。 set 关键字为输出linux所有的变量,包括预定义的和自定义的。 一旦设置 set -u,如果没有定义变量
阅读全文

浙公网安备 33010602011771号