ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: Re: texexec command line switches missing in ruby version
Date: Wed, 27 Sep 2006 14:23:52 +0100	[thread overview]
Message-ID: <E1GSZOC-0001sh-00@skye.ra.phy.cam.ac.uk> (raw)
In-Reply-To: Your message of "Wed, 27 Sep 2006 14:22:26 +0200." <efdqe3$lrg$1@sea.gmane.org>

> > $ cat /home/sanjoy/bin/texmfstart
> > #!/bin/bash
> > ruby `kpsewhich --format=texmfscripts texmfstart.rb` "$@"
> > 
> > $ cat /home/sanjoy/bin/texexec
> > #!/bin/sh
> > texmfstart texexec.rb "$@"
> > 
> 
> Thanks, I'm using them too, but I remember there was some confusion
> about "$@" versus $@ in this command.

"$@" is correct.  $@ passes on arguments one word at a time whereas
"$@" will wrap each argument in quotes.  I know that's a cloudy
explanation, so here's an example of the difference.  If you have a
filename with spaces (gah!) like "abc def.tex", then

  texexec "abc def.tex"

will execute (with "$@")

  texmfstart texexec.rb "abc def.tex"  # good

whereas using $@ it would execute

  texmfstart texexec.rb abc def.tex   # not good!

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

      parent reply	other threads:[~2006-09-27 13:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-26 12:21 Ralf Schmitt
2006-09-26 12:29 ` Hans Hagen
2006-09-26 12:35 ` Ralf Schmitt
2006-09-26 16:29   ` Hans Hagen
2006-09-26 17:28     ` Peter Rolf
2006-09-27  4:02   ` Sanjoy Mahajan
2006-09-27  7:08     ` Ralf Schmitt
2006-09-27 11:59       ` Sanjoy Mahajan
2006-09-27 12:22         ` Ralf Schmitt
2006-09-27 12:39           ` Hans Hagen
2006-09-27 13:23           ` Sanjoy Mahajan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GSZOC-0001sh-00@skye.ra.phy.cam.ac.uk \
    --to=sanjoy@mrao.cam.ac.uk \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).