I agree with Stefan. Shell and declares don't really mean the same
thing. There are things that can be achieved by shell commands that
can't be achieved *just* with declares. Declares allow us to use
external frameworks, whereas shell commands are a combination of
scripting and full-fledged applications – like find, grep and tail, as
mentioned above.
So depending on what you're doing, the right choice may be one or the
other. Like, for instance, determining the id of the current user. You
can do that with Declares, a shell command, or even in pure RB. The
shell solution is probably the easiest one to write: use the whoami
command. The Fastest will probably be the Declare – albeit a bit more
verbose, see http://www.declaresub.com/Articles/HowDoI.html#userName.
And the more x-plat will be the pure RB one [the shell option being
2/3 x-plat as it works in both Mac OS X and Linux]. So depending on
your needs, you may want to chose one or the other.
HTH
--
dda
libcurl4RB, [S]FTP transfers made easy
http://sungnyemun.org/?q=node/8
RBDeveloper Columnist, "Beyond the Limits"
http://rbdeveloper.com
On 5/12/06, Stefan Pantke <[EMAIL PROTECTED]> wrote:
This statement is in fact a strong over-generalization.
Declares are very useful, but often there are much simpler small or
very small shell based solution.
Some examples:
- Find a file 'ABC' in your file system:
find / -name ABC -print
- Trace the last lines of a file, e.g. a log file
tail -f /var/log/messages
- Find all occurrences of a string ABC in the current directory:
fgrep ABC *
As you see, shell script have their strong points, while Declares are
useful too.
You should decide - based on your task and your knowledge - which
option to choose.
Am 11.05.2006 um 23:36 schrieb Joseph Ranieri:
> Declares are the better solution -- they're just a bit more
> complicated to use.
>
> -- Joe Ranieri
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>