Sed Regular Expression
Today I also used Sed to do some relatively complex job. So I used regular expression. However, the expression in Sed is a little bit different from normal Regexp, especially the "(". There is no need to write it as "\(", the solely "(" is OK!
#!/bin/bash
cd /Volumes/Macintosh_HD_2/Research/RData/R_Packages/TCGA_EDRN_Gene_Mining/R/
for file in *.R;
do
echo $file
sed -ig 's/EDRN_CNV_Gene_Eset.rda/CNV_Eset.rda/g' $file
sed -ig 's/EDRN_TvN_ExpressionData.rda/Expression_TvN_EDRN.rda/g' $file
sed -ig 's/EDRN_TvN_MethylationData_CC_SuhSample_BGcor.rda/Methylation_TvN_TCGA.rda/g' $file
sed -ig 's/Expression_CellLine_Match_Ade.rda/Expression_CellLine_EDRN.rda/g' $file
sed -ig 's/TCGA_Exp_Match.rda/Expression_TvN_TCGA.rda/g' $file
sed -ig 's/TCGA_Meth_Match_NARM.rda/Methylation_TvN_TCGA.rda/g' $file
sed -ig "s/load(\'\.\/Data\//data(/g" $file
sed -ig "s/\.rda\')/)/g" $file
done
Sed Regular Expression的更多相关文章
- [LeetCode] Regular Expression Matching 正则表达式匹配
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character ...
- myeclipse中导入js报如下错误Syntax error on token "Invalid Regular Expression Options", no accurate correc
今天在使用bootstrap的时候引入的js文件出现错误Syntax error on token "Invalid Regular Expression Options", no ...
- [LeetCode] 10. Regular Expression Matching
Implement regular expression matching with support for '.' and '*'. DP: public class Solution { publ ...
- No.010:Regular Expression Matching
问题: Implement regular expression matching with support for '.' and '*'.'.' Matches any single charac ...
- Regular Expression Matching
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character ...
- 【leetcode】Regular Expression Matching
Regular Expression Matching Implement regular expression matching with support for '.' and '*'. '.' ...
- 【leetcode】Regular Expression Matching (hard) ★
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character ...
- grep(Global Regular Expression Print)
.grep -iwr --color 'hellp' /home/weblogic/demo 或者 grep -iw --color 'hellp' /home/weblogic/demo/* (-i ...
- 66. Regular Expression Matching
Regular Expression Matching Implement regular expression matching with support for '.' and '*'. '.' ...
随机推荐
- 转:Oracle中的rownum不能使用大于>的问题
一.对rownum的说明 关于Oracle 的 rownum 问题,很多资料都说不支持SQL语句中的“>.>=.=.between...and”运算符,只能用如下运算符号“<.< ...
- POJ 1012 Joseph 推导,暴力,约瑟夫环,打表 难度:2
http://poj.org/problem?id=1012 答案以954ms飘过,不过这道题可以轻松用打表过 思路:如果我们把每个人位于数组中的原始编号记为绝对编号,每次循环过后相对于绝对编号为0的 ...
- 判断数据库内容,在页面显示自定义数据case when
判断数据库内容,在页面显示自定义数据 case when...then ...else...end 比如:数据库内容是这样: 通过sql语句判断,数据库的name字段,内容是月桂的,显示嫦娥,其他的显 ...
- C#Winform从页面获取数据,传入数据库
环境: 1.SQLite数据库新建数据表,设置相应的字段.(其他数据库形式都相似,using相应数据库的包即可) 2.页面有两个textBox:textBox1.textBox2, 3.一个保存按钮: ...
- ICTCLA中科院分词工具用法(java)
摘要:为解决中文搜索的问题,最开始使用PHP版开源的SCWS,但是处理人名和地名时,会出现截断人名地名出现错误.开始使用NLPIR分词,在分词准确性上效果要比SCWS好.本文介绍如何在windows系 ...
- FG模型
一直没搞懂CvBGStatModel和CvFGDStatModel有什么区别.CvBGStatModel模型的创建用cvCreateGaussianBGModel,CvFGDStatModel模型的创 ...
- sql思维
写sql的思路不同于常规编程语言(C.python)等等.前者,考虑如何一步步地得到最终答案:后者,考虑如何一步步地收缩数据范围. 简而言之,前者是面向过程化(for each row do x),后 ...
- mouseOver与rollOver
区别: 当父容器监听这两个事件,鼠标从父容器移到子容器再移回父容器时,会触发mouseOver.mouseout事件,但是不会触发rollover.rollout事件.
- Android 移动缩放的ImageView
今天介绍一下Android中怎么实现ImageView的缩放和移动,自定义TouchImageView. public class TouchImageView extends ImageView { ...
- 本节向大家介绍一下UML建模误区
本节向大家介绍一下UML建模误区,这里向大家介绍九个误区,希望通过本节的学习,你对UML建模有清晰的认识,以免在以后使用过程中产生不必要的麻烦.下面让我们一起来看一下这些建模误区吧. UML建模误区 ...