Hi Arvind, Alas, this doesn't work since the command argument itself gets quoted in addition to the argument value.
Gunnar On Sat, Aug 13, 2016 at 2:53 AM, Arvind <[email protected]> wrote: > Hi Gunnar, > > > > Defining a function/alias seems to be a good way to do it, unless you want > trafci to prompt you for the hostname:port/username/password. > > > > Could you try by including double quotes in your function definition ? > That should help execute commands via -q or -sql or -s as described in : > > > > http://trafodion.incubator.apache.org/docs/command_ > interface/index.html#trafci_option_params > > > > function arvci() { trafci.sh -h host.com:23400 -u usr -p pwd “$@”; } > > > > Alias should also work in the same way (enclose in single quotes) > > > > alias arvci=’trafci.sh -h host.com:23400 -u usr -p > pwd “$@” ‘ > > > > Do excuse if I misunderstood the problem with function/alias definition. > > > > I’m not currently aware of how to pass the connection information for > trafci– jdbc applications can pass the information to the driver via > properties file. I’ll look up or someone on this list will chime in, if it > is possible, with that information. > > > > Regard > > Arvind > > > > *From:* Gunnar Tapper [mailto:[email protected]] > *Sent:* Friday, August 12, 2016 11:52 PM > *To:* [email protected] > *Subject:* trafci connection info in a file > > > > Hi, > > > > I'm running trafci from a Linux box outside a Trafodion cluster. I'd > really like to be able to type: trafci -q "get schemas;" or something like > that rather than having to put in all the connection info. > > > > The Command Interface Guide shows how to set an alias but that doesn't > allow optional parameters. So, I went with a function: function trafci() { > ./trafci -h host.com:23400 -u usr -p pwd $@; }, which works as long as > the argument string isn't quoted; the shell strips off the quotes. > > > > Is there a .trafci or something that I can populate with the connection > info? > > > > -- > > Thanks, > > > > Gunnar > > *If you think you can you can, if you think you can't you're right.* > -- Thanks, Gunnar *If you think you can you can, if you think you can't you're right.*
