Difference between revisions of "Anuvarsh Week 6"
(started the assignment, saving first command) |
m (entered a line break) |
||
Line 1: | Line 1: | ||
4 hours later... part one done!!!!!!! | 4 hours later... part one done!!!!!!! | ||
− | '''Application.txt --> SQL commands''' | + | '''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" > ~/public_html/application.sql.txt |
Revision as of 05:35, 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" > ~/public_html/application.sql.txt