设置坐标轴的是set xtics axis和set ytics axis,设置箭头的是set arrow。这三句是画坐标轴的关键。最后画出的图如下:
Continue reading...Adin
for 与 sed 结合逐行读取文件内容并分别写入新文件内
1.假设文件名为data,有6行:
for i in {1..6} ; do sed -n $i”p” data > “data”$i; done
i从1自增到6,sed命令结合参数n使输出只打印行数i的数据,之后重定向到data$i文件。
2.如果要删除这些以数字结尾的文件,可执行命令:
Continue reading...Gnuplot 在三维坐标中描绘二维曲线
缺乏关键词在网上找了很久,没找到该如何在三维坐标中画二维曲线,用splot直接画,画出的都是一些3维曲面,并没有得到单纯的一条二维曲线。 上图是sin(x)在三维坐标中的曲面图,而目标是在特定的x或y值上的一条正弦曲线,还有一定差距,后来在Gnuplot的官方文档中找到了一丝端倪。如下: 这个图形已经很接近我们想要的了,只是一个是平面,一个是线,把这些平面去掉只保留曲线就是我们要找的实现方法。 通过网上查找很容易得到了Fence...
Continue reading...Gnuplot设置坐标轴名称 , 修改坐标轴刻度等命令记录
1.设置/显示坐标名称
gnuplot> set xlabel “name_x”
gnuplot> set ylabel “name_y”
gnuplot> set zlabel “name_z”
2.设置坐标显示刻度1.设置/显示坐标名称
gnuplot> set xlabel “name_x”
gnuplot> set ylabel “name_y”
gnuplot> set zlabel “name_z”
2.设置坐标显示刻度
Continue reading...grep 正则匹配 结合history搜索命令行历史记录
如查找用vim打开C语言.h文件的历史记录,可以用如下命令查找
history | grep “vim .*\.h$”
任意匹配不能单用*表示,*表示前一个字符匹配任意次数
Vim 特定目录打开的.C文件关闭syntastic的语法检查功能
有时候研究C语言源码,打开发现一大堆报错,或者警告,影响观感,每次手动关闭甚是麻烦。
可以在.vimrc里配置,当检测到特定目录时关闭语法检查功能。
配置如下:
Continue reading...Arch Linux kernel panic诊断
以下内容摘自Arch wiki
做个复制,方便查看
Examine panic message
If a kernel panic occurs very early in the boot process, you may see a message on the console containing “Kernel panic – not syncing:”, but once Systemd is running, kernel messages will typically be captured and written to the system log. However, when a panic occurs, the diagnostic message output by the kernel is almost never written to the log file on disk because the m
Continue reading...