Exporting Access to MySQL (again)

Steve Stavropoulos steve at math.upatras.gr
Sun Oct 7 15:26:01 EEST 2001


On Sun, 7 Oct 2001, Stoilis Giannis wrote:

> EXPORTED TXT FILE:
> 1	eggafi1-pedio2	"eggafi1-pedio3 eggafi1-pedio3 eggafi1-pedio3
> eggafi1-pedio3 eggafi1-pedio3"	eggafi1-pedio4
> 2	eggrafi2-pedio2	"eggrafi2-pedio3 eggrafh2-pedio3 eggrafh2-pedio3
> egrafi2-pedio3 eggrafh2-pedio3"	eggrafh2-pedio4
>
> Mhpws na to prosseggisw kapws alliws to problhma? Mhpws p.x. na mporesw me
> kapoia regexp kai na bgalw entelws to newline, otan einai mesa sta
> eisagwnika? Poios kalos regexp gurou 8a mou pei pws 8a to kanw auto me sed?
> keramida, akous??? :-)

 Edw 8a sou synistousa to 'sed & awk' apo thn O'Reilly.
To script pou 8es einai to e3hs:
BEGIN sed SCRIPT---

/ "/ {
N
s/\("[^"]*\)\n/\1/
P
D
}

END sed SCRIPT---

Den to dokimasa, mporei na exei kanena xazo la8os, alla 8a thn bgaleis thn
akrh monos sou apo edw kai pera.


> Genika, to documentation ths mysql den fainetai na ekshgei thn dikia mou
> periptwsh. Epsaksa kai ligo sto internet gia peraiterw plhrofories, alla den
> brhka tipota aksiologo. Exei kapoio link kapoios na koitaksw na fwtistw?
>

 RTFM, to documentation ths MySQL einai TELEIO. koita thn entolh 'load'
(load data local infile 'kokos' into ...)

 hint: To newline sto file pou exeis EINAI meros tou pediou kai SWSTA h
MySQL tou symperiferetai ws tetoio.




More information about the Linux-greek-users mailing list