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 '*'. '.' ...
随机推荐
- Linux系统中的日常监控知识点
1.命令熟悉之w [xiongchao@oc3006745124 Desktop]$ w :: up :, users, load average: 1.48, 1.19, 1.11 USER TTY ...
- X61的intel wireless 3945abg 不再掉线了
X61本的3945ABG无线网卡总是用一段时间就掉一次线(大约一个小时不到),换过两个路由器都这毛病. 今天有空,查了下,把网卡的“节约电源”去掉了,照样掉. 升级了驱动,掉的更勤了. 调整无线通道, ...
- webApi跨域
<system.webServer> <httpProtocol> <customHeaders> <add name="Access-Contro ...
- 动态加载的数据,hover效果
$('.option li').live('mouseenter',function(){ $(this).addClass("active"); ...
- Jquery操作复选框(CheckBox)的取值赋值实现代码
赋值 复选框 CheckBox 遍历 取值 1. 获取单个checkbox选中项(三种写法): $("input:checkbox:checked").val() 或者 $(&q ...
- 阻止Infinitescroll.js无限滚动加载页面解决方法
由于某些原因,想终止当前页继续翻页的操作,可在Infinitescroll回调函数中将翻页事件取消. 代码如下: // -- 每页滚屏加载的页数-- var IpageItems = 5; var i ...
- idea常用快捷键大全(转)
IntelliJ Idea 常用快捷键列表 文章来自:http://lavasoft.blog.51cto.com/62575/97730/ Alt+回车 导入包,自动修正Ctrl+N 查 ...
- BCP 导入导出数据库数据
使用 bcp 将数据库迁移到 Azure SQL Database --所有 都是在本机sql上运行--先开启cmdshellEXEC sp_configure 'show advanced opti ...
- js面向对象(构造函数与继承)
深入解读JavaScript面向对象编程实践 Mar 9, 2016 面向对象编程是用抽象方式创建基于现实世界模型的一种编程模式,主要包括模块化.多态.和封装几种技术. 对JavaScript而言,其 ...
- Note_Master-Detail Application(iOS template)_06_ YJYDetailViewController.h
// YJYDetailViewController.h #import <UIKit/UIKit.h> @interface YJYDetailViewController : UIV ...