Troque Week 6

From LMU BioDB 2015
Revision as of 21:37, 14 October 2015 by Troque (Talk | contribs) (Creating this page and saving my work)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

User Page        Bio Databases Main Page       


Creating the Table on PostgreSQL

Processing the Data on the Command Line

cat application.txt | 
sed -e 's/\s\+/,/2' | 
sed -e 's/\s/,/1'| 
sed "s/,/,'/1" | 
sed "s/,/',/2" | 
sed "s/,/,'/2" | 
sed "s/\s*False/',False/1" | 
sed "s/False\s*False/FalseFalse/g" | 
sed "s/False\s*/False,/g" | 
sed "s/,/,'/5" | 
sed "s/,'../&',/3" | 
sed "s/,\s*/,/6" | 
sed "s/\t/,'/" | 
sed "s/\t/'/" | 
sed "s/P',$/&,,/g" | 
sed "s/TA',$/&,,/g" | 
sed "s//null/g" | 
sed "s/V\r$/,'V'/g" | 
sed "s/'S'/&,null/g" | 
sed "s/'P'/&,null/g" | 
sed "1d" | 
sed "s/\t//g" | 
sed "s/[0-9],null/&,null/" | 
sed "s/^/insert into application (ApplNo,ApplType,SponsorApplicant,MostRecentLabelFlag, 
                                  CurrentPatentFlag,ActionType,ChemicalType,
                                  Ther_Potential,OrphanCode) values (/g" | 
sed "s/\r$/);/" | 
sed "s/null$/&);/g" | 
sed "s/'V'$/&);/" > ~/public_html/application.sql.txt


Assignment Links

Weekly Assignments

Individual Journal Entries

Shared Journal Entries