using command line to load file

The file I have is named test.q and contains:a: 2+1a\my command line is:q test.qto which I expect to see:3and the q session exits and I am backto the linux command prompt.Instead, I am left in a q session and the file test.q is not loaded.I know this because when I type a, I get:`aThis is not happening. Any suggestions?

X-Mailer: Apple Mail (2.936)

“a” works only in the console.
to print on the screen use “show a”

I changed test.sq code to be the following:a: 1 + 2show a\Then at the linux prompt I type:q test.sqI do not see:3followed by the “q” session exiting.What happens is a “q” session starts.No “3” displayed and the session doesn’t end as I would expect itshould in response to the \ command to exit.On Jun 29, 10:43?am, Felix Lungu <felix.lu…> wrote:> “a” works only in the console.> to print on the screen use “show a”>> On 29 Jun 2010, at 18:40, butch wrote:>> > The file I have is named test.q and contains:>> > a: 2+1> > a> > \>> > my command line is:>> > q test.q>> > to which I expect to see:>> > 3>> > and the q session exits and I am back> > to the linux command prompt.>> > Instead, I am left in a q session and the file test.q is not loaded.> > I know this because when I type a, I get:>> > `a>> > This is not happening. ?Any suggestions?>> > – ?> > You received this message because you are subscribed to the Google ?> > Groups “Kdb+ Personal Developers” group.> > To post to this group, send email to personal-> > kdbplus@googlegroups.com.> > To unsubscribe from this group, send email to personal-kdbplus+unsubscribe@googlegroups.com> > .> > For more options, visit this group athttp://groups.google.com/group/personal-kdbplus?hl=en> > .</felix.lu…>

I had a typo. I actually should have typed:test.q, not test.sqOn Jun 29, 5:17?pm, butch <elmer_…> wrote:> I changed test.sq code to be the following:>> a: 1 + 2> show a> \>> Then at the linux prompt I type:>> q test.sq>> I do not see:>> 3> followed by the “q” session exiting.>> What happens is a “q” session starts.>> No “3” displayed and the session doesn’t end as I would expect it> should in response to the \ command to exit.>> On Jun 29, 10:43?am, Felix Lungu <felix.lu…> wrote:>> > “a” works only in the console.> > to print on the screen use “show a”>> > On 29 Jun 2010, at 18:40, butch wrote:>> > > The file I have is named test.q and contains:>> > > a: 2+1> > > a> > > \>> > > my command line is:>> > > q test.q>> > > to which I expect to see:>> > > 3>> > > and the q session exits and I am back> > > to the linux command prompt.>> > > Instead, I am left in a q session and the file test.q is not loaded.> > > I know this because when I type a, I get:>> > > `a>> > > This is not happening. ?Any suggestions?>> > > – ?> > > You received this message because you are subscribed to the Google ?> > > Groups “Kdb+ Personal Developers” group.> > > To post to this group, send email to personal-> > > kdbplus@googlegroups.com.> > > To unsubscribe from this group, send email to personal-kdbplus+unsubscribe@googlegroups.com> > > .> > > For more options, visit this group athttp://groups.google.com/group/personal-kdbplus?hl=en> > > .</felix.lu…></elmer_…>

$more ./test.q

a: 2+1

a

\

$q ./test.q

KDB+ 2.6 2010.06.28 Copyright (C) 1993-2010 Kx Systems

m64/ 2(2)core 2048MB x

3

$

maybe you have an alias that is dropping any arguments given to q?

Thanks.My problem was that I was:was trying to use a file called Q which was in my ~/bin directory.the contents of Q was: rlwrap /home/elmer/q/l32/qWhen I ran “Q ./test.q” it doesn’t work.I copied “q” from the ~/q/l32 into ~/binwhen I run “q .test.q” it works fine.thanksOn Jun 29, 5:26?pm, Charles Skelton <char…> wrote:> $more ./test.q> a: 2+1> a> \> $q ./test.q> KDB+ 2.6 2010.06.28 Copyright (C) 1993-2010 Kx Systems> m64/ 2(2)core 2048MB x>> 3> $>> maybe you have an alias that is dropping any arguments given to q?>> On Wed, Jun 30, 2010 at 12:19 AM, butch <elmer_…> wrote:> > I had a typo. ?I actually should have typed:>> > test.q, not test.sq>> > On Jun 29, 5:17 pm, butch <elmer_…> wrote:> > > I changed test.sq code to be the following:>> > > a: 1 + 2> > > show a> > > \>> > > Then at the linux prompt I type:>> > > q test.sq>> > > I do not see:>> > > 3> > > followed by the “q” session exiting.>> > > What happens is a “q” session starts.>> > > No “3” displayed and the session doesn’t end as I would expect it> > > should in response to the \ command to exit.>> > > On Jun 29, 10:43 am, Felix Lungu <felix.lu…> wrote:>> > > > “a” works only in the console.> > > > to print on the screen use “show a”>> > > > On 29 Jun 2010, at 18:40, butch wrote:>> > > > > The file I have is named test.q and contains:>> > > > > a: 2+1> > > > > a> > > > > \>> > > > > my command line is:>> > > > > q test.q>> > > > > to which I expect to see:>> > > > > 3>> > > > > and the q session exits and I am back> > > > > to the linux command prompt.>> > > > > Instead, I am left in a q session and the file test.q is not loaded.> > > > > I know this because when I type a, I get:>> > > > > `a>> > > > > This is not happening. ?Any suggestions?>> > > > > –> > > > > You received this message because you are subscribed to the Google> > > > > Groups “Kdb+ Personal Developers” group.> > > > > To post to this group, send email to personal-> > > > > kdbplus@googlegroups.com.> > > > > To unsubscribe from this group, send email to> > personal-kdbplus+unsubscribe@googlegroups.com> > > > > .> > > > > For more options, visit this group athttp://> > groups.google.com/group/personal-kdbplus?hl=en> > > > > .>> > –> >

Submitted via Google Groups</felix.lu…></elmer_…></elmer_…></char…>