On Thu, 2002-09-05 at 17:02, Ronan Heffernan wrote:
> > That is bash specific. Won't work on other platforms with a more
> > traditional bourne shell implementation.
> >
>
> If portability is a concern, I would go with Python. It works the same
> way regardless of the shell (even non-Bourne shells). It even works on
> Windows!
It also requires *having* python installed. The same could be said about
perl, really:
#!/usr/bin/perl
for($i=0;$i++;$i<10) { system("command") }
system("othercommand");
You could even do that in a one-liner without a script:
# perl -e 'for ($i=0;$i++;$i<10) { system("command") }'
Joe was right, however. The second set of bourne shell scripts I gave in
my earlier email example will ONLY work under BASH (/bin/bash). If
you're looking for a truely portable Unix solution, the best approach
would be a "pure" bourne shell script (/bin/sh), or maybe even a Korn
shell script (/bin/ksh).
- Ian C. Blenke <icblenke@nks.net> <ian@blenke.com>
http://ian.blenke.com
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:58:17 EDT