Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
shell variable parsing in a file?
- X-seq: zsh-workers 5406
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxx>
- To: Jason Price <gt5076c@xxxxxxxxxxxxxx>
- Subject: shell variable parsing in a file?
- Date: Tue, 16 Feb 1999 20:06:58 -0800 (PST)
- Cc: zsh-workers@xxxxxxxxxxxxxx
- In-reply-to: <199902162213.RAA15329@xxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199902162213.RAA15329@xxxxxxxxxxxxxxxxxxxx>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
Jason Price writes:
> What I'd like to do is create a file like so:
>
> user.$USER.group.$GROUP
>
> echo "`cat datafile`"
>
> Is there a way that I can do this?
This will work:
zsh% eval "cat <<EOF
dquote> $(<datafile)
dquote> EOF"
> What I'm trying to do is set up a script that will querry for group name,
> and some other data, and then set up some tables for them to use under
> mySQL. If there is an easier way to do this, let me know, as a DBA, I am
> not.
There's a perl DBD driver so that you can use the DBI package to send
commands to mySQL. You could write a perl program that interpolates
the necessary variables and creates the schema.
> (PS: I tried to send this to zsh-users@xxxxxxxxxxxxxx, but that bounced.
It should have worked ... what was the reason given for the bounce, in
the returned message?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author