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 '*'. '.' ...
随机推荐
- urlrewrite伪静态 及多参数传递-附正则表达式语法 [轉]
首先 加载 urlrewrite包 配置web.xml [list] [*] <error-page> [*] <error-code>404</ ...
- TCP的三次握手
第一次握手 客户端调用connect,向服务端发送连接请求报文.该报文是一个特殊报文,报文首部同步位SYN=1,同时确认位ACK=0,seq=x表示确认字段的值为x,该字段值由客户端选择,表示客户端向 ...
- "数学口袋精灵"bug的发现
团队成员的博客园地址: 曾治业:http://www.cnblogs.com/zzy999/ 陈焕恳:http://www.cnblogs.com/4249ken/ 蓝叶:http://www.cnb ...
- 周游加拿大(dp好题)
你赢得了一场航空公司举办的比赛,奖品是一张加拿大环游机票.旅行在这家航空公司开放的最西边的城市开始,然后一直自西向东旅行,直到你到达最东边的城市,再由东向西返回,直到你回到开始的城市.每个城市只能访问 ...
- C语言实例代码
绘制余弦曲线和直线 #include #include int main() { double y; int x,m,n,yy; for(yy=0;yy<=20;yy++) {y=0.1*yy; ...
- SharePoint 2010 BCS - 概述
博客地址 http://blog.csdn.net/foxdave SharePoint 2010首次引入了BCS的概念 - Business Connectivity Service,即业务连接服务 ...
- Visual Studio 2013 如何关闭调试而不关闭IIS Express
在VS主面板打开:工具->选项->调试->编辑继续 取消选中[启用"编辑并继续"] 就OK了 (英文版的请对应相应的操作) 不过这是针对所有的调试,如果你想针 ...
- LOGISTIC REGRESSION
In logistic regression we learn a family of functions
- ansible quick start
1. ansible默认开启ControlPersist,也就是持续化ssh的socket连接,以跳过每次task都需要进行主机认证. 2. 但是centos的openssh版本太老了,不支持Cont ...
- Xrun 将 app 转化为 IPA
xcodebuild命令行打包,在使用xcodebuild编译后发现有些东西有些临时性质的东西,依然存在,搜索了一些资料,找到有clean的命令:在之前打包都是生成app文件,将app打包成ipa文件 ...