On Tue, 2002-12-03 at 19:48, Warren Massengill wrote:
> My database is pg, the table is mail.
> The small text files are in /home/kelly/message/.
> The bash shell script is merge.
>
> Somehow I failed to translate your instructions...
>
> -----------------------------------------------------
> #!/bin/bash
>
> for f in `ls /home/kelly/message*`
^^^^^^
message/*
> do
> psql -d pg -c "INSERT INTO mail (message)
> VALUES ('`cat $f`')"
> done
Your files are in that directory, so the wild card must be too.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"What shall we then say to these things? If God be for
us, who can be against us?" Romans 8:31