richor的个人博客分享 http://blog.sciencenet.cn/u/richor

博文

OSX下的sed和fortran

已有 2076 次阅读 2018-4-24 09:51 |个人分类:计算机|系统分类:科研笔记| OSX, fortran, sed, fortran, fortran

【osx下的sed】

处理这类errorcommand i expects \ followed by text

https://stackoverflow.com/questions/14846304/sed-command-error-on-macos-x

解决办法:brew install gnu-sed

* 注意alias sed=gsed don’t work for bash script, as “Aliases are not expanded when the shell is not interactive, unless the expand_aliases shell option is set using shopt (see the description of shopt under SHELL BUILTIN COMMANDS below)” in bash manpage.

The best way is:

https://unix.stackexchange.com/questions/1496/why-doesnt-my-bash-script-recognize-aliases

just use a variable in the script.

GSED = /usr/loca/bin/gsed

$GSED ‘script’ file


sed的替换

【如何安装fortran】

https://www.zhihu.com/question/26534875

荆棘林荫的回答。

实际安装:

after you type >>brew install gcc

Installing dependencies for gcc: gmpmpfrlibmpcisl

/usr/local/Cellar/gmp/6.1.2_2: 18 files, 3.1MB, built in 4 minutes 16 seconds

/usr/local/Cellar/mpfr/4.0.1: 28 files, 4.6MB, built in 2 minutes 58 seconds

/usr/local/Cellar/libmpc/1.1.0: 12 files, 358.9KB, built in 1 minute 1 second

/usr/local/Cellar/isl/0.19: 66 files, 3.8MB, built in 1 minute 49 seconds

/usr/local/Cellar/gcc/7.3.0_1: 1,485 files, 290.0MB, built in 72 minutes 15 seconds

just be patient~

【vim配置】

set ruler

set number等

https://blog.csdn.net/YZHY_Ocean/article/details/7272222

各种快捷键:

http://www.cnblogs.com/smstars/archive/2013/05/18/3085342.html

u:撤销删除

【grep使用】

grep -v 用于反向选择!

https://stackoverflow.com/questions/3548453/negative-matching-using-grep-match-lines-that-do-not-contain-foo



https://blog.sciencenet.cn/blog-485752-1110622.html

上一篇:xyz轨迹文件距离分析
下一篇:密度泛函
收藏 IP: 210.72.8.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-9-27 23:31

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部