zsh-users
 help / color / mirror / code / Atom feed
* pop - is there a more elegant solution
@ 2001-06-28  8:01 jarausch
  2001-06-28  8:04 ` Sven Wischnowsky
  2001-06-28  8:23 ` Bart Schaefer
  0 siblings, 2 replies; 3+ messages in thread
From: jarausch @ 2001-06-28  8:01 UTC (permalink / raw)
  To: zsh-users

Hello,

just being curious,
is there a more elegant (less cryptic) solution to

#!/bin/zsh
# get the last parameter and shorten the list
# emulate Perl's pop function
echo $@
last=$[-1]
# shorten the parameter array
set $@[0,$[-1+$#]]
echo $@

Thanks for your opinion,


Helmut Jarausch

-- 
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-28  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-28  8:01 pop - is there a more elegant solution jarausch
2001-06-28  8:04 ` Sven Wischnowsky
2001-06-28  8:23 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).