• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Shell Scripting Sqlite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Shell Scripting Sqlite
      • From: BareFeet <email@hidden>
References: 
 >Shell Scripting Sqlite (From: Bruce Robertson <email@hidden>)

  • Prev by Date: Shell Scripting Sqlite
  • Next by Date: AppleMods Loader : The Next Generation
  • Previous by thread: Shell Scripting Sqlite
  • Next by thread: Re: Shell Scripting Sqlite
  • Index(es):
    • Date
    • Thread