摘要: 上线左右或者wasd移动,q或Q退出 /* 2048.c */ #include<stdio.h> #include<stdlib.h> #include<curses.h> #include<unistd.h> #include<signal.h> #include<time.h> int a[4 阅读全文
posted @ 2020-01-03 15:26 王清河 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 题目: 编写shell脚本获取本机的网络地址。 答案: #!/bin/bash IP=`ifconfig | grep "inet addr" | sed '/127/d' | awk '{print $2}' | awk -F : '{print $2}'` MASK=`ifconfig | gr 阅读全文
posted @ 2020-01-03 11:15 王清河 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 前置步骤(安装依赖库): sudo apt-get update sudo apt-get install build-essential sudo apt-get install libgl1-mesa-dev sudo apt-get install libglu1-mesa-dev $sudo 阅读全文
posted @ 2020-01-03 10:57 王清河 阅读(3607) 评论(0) 推荐(2) 编辑
摘要: 题目:写一个shell脚本来得到当前的日期,时间,用户名和当前工作目录 答案: 解析:$LOGNAME 获取登录用户名 date 获取当前时间 who i am 获取用户名,用户数据所在磁盘号,以及日期和ip地址 pwd获取当前文件所在路径 注意点: 如果系统应用了中文语言包的话,who i am 阅读全文
posted @ 2020-01-03 10:46 王清河 阅读(201) 评论(0) 推荐(0) 编辑