[OS X TeX] small trick on the command line

Bernhard Barkow bb at creativeeyes.at
Wed Feb 9 14:04:34 CET 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

As far as I understand it, \!^ expands to the first argument of the 
command, like \!:1 (Actually, I just learned it should be \!:^, but in 
case of ^, $, *, - or % as argument selector, the ':' can be omitted).
However, I didn't know that \!:<n> is possible, otherwise I would have 
used that, \!^ was just the first solution I found (as I said, my 
experience with shell programming is very basic...).

Bernhard

On 9. Feb 2005, at 11:41, Peter Dyballa wrote:

>
> Am 08.02.2005 um 22:39 schrieb Bernhard Barkow:
>
>> alias texopen open -a emacs '`kpsewhich \!^`'
>
> This is a new syntax to me: \!^. I'd use in my csh or tcsh aliases a 
> different notation:
>
>   alias floc   'locate /\!:1 | grep \!:1$'     # locate a name 
> starting with / and ending by itself
>   alias PSu    "ps -O pid,pgid,ppid,ruser,command -U \!:1 | egrep 
> RUSER\|\!:2 | grep -v grep"
>
> or I'd use "\!*" to pass all the alias' arguments from the command 
> line into the alias. What is the syntax "\!^" meaning and doing?
>
> --
> Greetings
>
>   Pete
>
> "If builders built buildings the way programmers write programs, then
> the first woodpecker that came along would destroy civilization."
>                               -- Weinberg's Second Law.
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFCCgpnqJ8JxFkhAg0RAn73AJ0Wv+pr3iN8DMys46X2rxsJ1ZUunQCeIMNQ
ftzuOnwN8TRH801+dTN7oI4=
=mdB5
-----END PGP SIGNATURE-----

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list