Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Recursion and shell functions
- X-seq: zsh-users 5431
- From: Eric De Mund <ead@xxxxxxxxx>
- To: "Rau'l Nu'n~ez de Arenas Coronado" <raul@xxxxxxxxxxxx>
- Subject: Re: Recursion and shell functions
- Date: Thu, 10 Oct 2002 16:14:14 -0700 (PDT)
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <20021010211547.GD10963@DervishD>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Ixian Systems, Inc.
- References: <20021010194154.GA10963@DervishD> <kgohefukqpk.fsf@xxxxxxxxxxxxxxxxxx> <20021010211547.GD10963@DervishD>
- Reply-to: Eric De Mund <ead@xxxxxxxxx>
[ Discussion moved from zsh-workers here to zsh-users. --Eric]
Rau'l,
Rau'l Nu'n~ez de Arenas Coronado <raul@xxxxxxxxxxxx>:
> First of all, please excuse this a-bit-off-topic question, but I need
> to know if a feature available in zsh is portable.
Jason Price <jprice@xxxxxxxxxxxxxxxxxxxx>:
> You could re-invent the wheel, but why?
> (cd <your source dir> ; tar -cpvf - .) | ( cd <your dest dir> ; tar -xpf -)
Rau'l Nu'n~ez de Arenas Coronado <raul@xxxxxxxxxxxx>:
> The aim is to depend only on the shell and POSIX utilities (like 'cp',
> 'rm, etc... you know.). I want to impose little or no dependencies.
> 'tar' is not a good solution for me, I prefer 'pax', although is not
> as extended by now, 'rsync' seems to big for copying a few bunch of
> files, and 'ssh'... well...
I love Zsh, but is it the right tool for this job? If dependency or
contrib software minimization is a requirement, I'm not sure how Zsh got
picked. In the past, when I've only been permitted one tool to do a job
that a system's supplied Bourne(-like) shell wasn't capable of perform-
ing, I've chosen Perl. If that hadn't been appropriate, I would have
perhaps next chosen BusyBox:
BusyBox
(combines tiny versions of many common UNIX utilities into a single
small executable, providing a fairly complete POSIX environment for
small or embedded systems)
http://www.busybox.net/
Everybody likes screenshots. Here's BusyBox's:
+----------------------------------------------------------------------------+
| $ ./busybox |
| BusyBox v0.60.3 (2002.04.27-10:33+0000) multi-call binary |
| |
| Usage: busybox [function] [arguments]... |
| or: [function] [arguments]... |
| |
| BusyBox is a multi-call binary that combines many common Unix |
| utilities into a single executable. Most people will create a |
| link to busybox for each function they wish to use, and BusyBox |
| will act like whatever it was invoked as. |
| |
| Currently defined functions: |
| [, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt, |
| clear, cp, cut, date, dd, df, dirname, dmesg, du, echo, env, false, |
| find, free, grep, gunzip, gzip, halt, head, id, init, kill, killall, |
| klogd, linuxrc, ln, logger, ls, lsmod, mkdir, mknod, mkswap, modprobe, |
| more, mount, msh, mv, pidof, poweroff, ps, pwd, reboot, reset, |
| rm, rmdir, sed, sh, sleep, sort, swapoff, swapon, sync, syslogd, |
| tail, tar, test, touch, true, tty, umount, uname, uniq, uptime, |
| wc, which, whoami, xargs, yes, zcat |
| |
| $ _ |
| |
+----------------------------------------------------------------------------+
Regards,
Eric
--
"Larry Wall wrote the original Perl in 1986-87, the same two successive years
he won the IOCCC. ...this was no fluke... Perl and Obfuscation are as insepar-
able as, say, camels and humps." --David Lowe
Eric De Mund <ead@xxxxxxxxx> | Ixian Systems, Inc. | 53 49 B2 23 AF 6C 20 81
http://www.ixian.com/ead/ | Mountain View, CA | ED DD 4C 81 AA C9 D1 A5
Messages sorted by:
Reverse Date,
Date,
Thread,
Author