[ale] [OT] sed/php/bash-script programming question

Danny Cox danscox at mindspring.com
Sun Oct 27 14:02:01 EST 2002


Jonathan,

On Sun, 2002-10-27 at 11:07, jonathan glass (ibb) wrote:
> echo "CREATE TABLE GKVoteRESULTS ("
> grep "<input" ballot.html \
> | sed s/"[<|>]"//g \
> | sed s/"^ *input "//g \
> | sed s/"type=radio "//g\
> | sed s/"value=[a-z ]* "//g \
> | sed s/"name="//g \
> | sed s/"$"/" varchar(20) NOT NULL,"/g

  | uniq

> echo "id int(5) NOT NULL auto_increment,
> time timestamp(14) NOT NULL,
> PRIMARY KEY  (id)
> )"

	At first blush, this ought to do it....  Can you be sure that the dups
will always be be together?

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list