Difference between revisions of "Anuvarsh Week 6"

From LMU BioDB 2015
Jump to: navigation, search
m (entered a line break)
(minor change to the first command)
Line 2: Line 2:
  
 
'''Application.txt --> SQL commands''' <br>  
 
'''Application.txt --> SQL commands''' <br>  
cat application.txt | sed "s/\t/*/g" | sed -r "s/( ){4}//g" | sed -r "s/( ){2}//g" | sed "s/ \*/*/g" | sed "s/\* /*/g" | sed "s/\*P\*\*/\*P\*/g" | sed "s/\*S\*\*/\*S\*/g" | sed "s/\*\*/*null*/g" | sed "s/\*\*/*null*/g" | sed "s/\*\r$/*null/g" | sed "s/*/,'/1" | sed "s/*/','/1" | sed "s/*/',/1" | sed "s/*/,/1" | sed "s/*/,'/1" | sed "s/*/',/1" | sed "s/*/,'/1" | sed "s/*/','/1" |sed "s/*/,'/1" | sed "s/\r$/'/g" | sed "s/'null'/null/g" | sed "s/'null/null/g" | sed "s/^/insert into application(ApplNo,ApplType,SponsorApplicant,MostRecentLabelAvailableFlag,CurrentPatentFlag,ActionType,Chemical_Type,Ther_Potential,Orphan_Code) values(/g" | sed "s/$/);/g" > ~/public_html/application.sql.txt
+
cat application.txt | sed "s/\t/*/g" | sed -r "s/( ){4}//g" | sed -r "s/( ){2}//g" | sed "s/ \*/*/g" | sed "s/\* /*/g" | sed "s/\*P\*\*/\*P\*/g" | sed "s/\*S\*\*/\*S\*/g" | sed "s/\*\*/*null*/g" | sed "s/\*\*/*null*/g" | sed "s/\*\r$/*null/g" | sed "s/*/,'/1" | sed "s/*/','/1" | sed "s/*/',/1" | sed "s/*/,/1" | sed "s/*/,'/1" | sed "s/*/',/1" | sed "s/*/,'/1" | sed "s/*/','/1" |sed "s/*/,'/1" | sed "s/\r$/'/g" | sed "s/'null'/null/g" | sed "s/'null/null/g" | sed "s/^/insert into application(ApplNo,ApplType,SponsorApplicant,MostRecentLabelAvailableFlag,CurrentPatentFlag,ActionType,Chemical_Type,Ther_Potential,Orphan_Code) values(/g" | sed "s/$/);/g" | sed 1D > ~/public_html/application.sql.txt

Revision as of 06:00, 12 October 2015

4 hours later... part one done!!!!!!!

Application.txt --> SQL commands
cat application.txt | sed "s/\t/*/g" | sed -r "s/( ){4}//g" | sed -r "s/( ){2}//g" | sed "s/ \*/*/g" | sed "s/\* /*/g" | sed "s/\*P\*\*/\*P\*/g" | sed "s/\*S\*\*/\*S\*/g" | sed "s/\*\*/*null*/g" | sed "s/\*\*/*null*/g" | sed "s/\*\r$/*null/g" | sed "s/*/,'/1" | sed "s/*/','/1" | sed "s/*/',/1" | sed "s/*/,/1" | sed "s/*/,'/1" | sed "s/*/',/1" | sed "s/*/,'/1" | sed "s/*/','/1" |sed "s/*/,'/1" | sed "s/\r$/'/g" | sed "s/'null'/null/g" | sed "s/'null/null/g" | sed "s/^/insert into application(ApplNo,ApplType,SponsorApplicant,MostRecentLabelAvailableFlag,CurrentPatentFlag,ActionType,Chemical_Type,Ther_Potential,Orphan_Code) values(/g" | sed "s/$/);/g" | sed 1D > ~/public_html/application.sql.txt