Re: Shell Scripting Sqlite
Re: Shell Scripting Sqlite
- Subject: Re: Shell Scripting Sqlite
- From: Bruce Robertson <email@hidden>
- Date: Thu, 29 May 2008 16:48:30 -0700
> With some success, I am experimenting with sqlite and shell scripts and
> FileMaker.
>
> However I'm trying to find a way do this more completely in memory using
> variables
Let me provide a much simpler example.
Assume existence of sqlite databaase data.db at the root of the drive,
containing table "people"
You can do this:
Do shell script "Echo 'select * from people;' | sqlite3 /data.db"
And get the contents of the people table.
Sqlite files are text files.
So you can do this:
set cmd to "cat /a.db"
Do shell script cmd
Set myDB to result
MyDB now contains the text of the sqlite database.
I want to figure out how to do something this:
Do shell script "Echo 'select * from people;' | sqlite3 " & myDB
That is, how do I pass an a variable to a shell command that is expecting a
file?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden