Everything2
Near Matches
Ignore Exact
Full Text
Everything2

csh history expansion refers to the line before most csh expansions occurred

created by ariels

(idea) by ariels (3.9 d) (print)   ?   I like it! Sun Apr 30 2000 at 8:44:53

People new to using csh history expansion are often confused by an apparent ambiguity regarding the order in which wildcard expansion and history expansion occur. For instance, in the sequence of commands
   % ls -l x*
   % echo !$
does the echo print the name of the last file listed by the ls command, or does the !$ expand to x*, causing the shell to see "echo x*"?

It turns out that the latter is the case, for the simple reason that it is far more often the Right Thing.

However, it should be noted that (by default) the shell considers the previous line after history expansion, so

   % cat !$
following the preceding 2 lines would cat all files beginning in x, not the file named "!$". This, too, is usually a Right Thing.

printable version
chaos

csh history idioms csh Discordian tcsh
Nothing is too serious to laugh at Michael Moore NX (Non Executable flag)
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Little presents from the Node Fairy:
Hilbert Hotel
Some Ethical Issues With The Use Of Robot Combatants
Jesse Owens
What the BLEEP Do We Know!?
Alcoholism
Thailand
Howlin' Wolf
Art Spiegelman
Orientation
Möbius scarf
The Pogues
Bronze Age
Broadway
New Writeups
jqwerty
The Anime Laws of Physics(person)
jjen
Sorrier than I ever thought I would be(personal)
locke baron
Moskva class antisubmarine cruiser(thing)
Wuukiee
May 15, 2008(idea)
locke baron
Kuznetsov class aircraft carrier(thing)
_lesra
for abby(thing)
Adaptive Child
Annie's garden salsa(recipe)
Simulacron3
Zig-Zag(thing)
Ouzo
Special Grilled Cheese(fiction)
Noung
Tiananmen Square Massacre(idea)
aneurin
Lord St Clair(person)
artman2003
Assholes and Douchebags: A Comparison(person)
locke baron
Tyan Thunder K8WE(thing)
locke baron
Udaloy class destroyer(thing)
Scaevola
Same-sex marriage(idea)
E2 is a by-product of the existence of The Everything Development Company