>From: Alexander Skwar <[EMAIL PROTECTED]>
>So sprach Gleydson Mazioli da Silva am Sat, Jun 16, 2001 at 10:40:20PM -040=
>0:
>> Humm, it do the same job for Linux systems, I need to know if it exist
>What Linux distribution ships with "tempfile"? I just had a look
>rpmfind.net, and none of the RPM based distributions has got a package
>called called tempfile or a package containing an executable called
>tempfile.
You are thinking the wrong way. You should think: what tools are available
on a standard compliant OS and will they fit my needs. If they fit your needs
then use them even if it might be easier to use the nonstandard things from
Linux.
... If it is _really_ not possible to live with standard tools, think of other
solutions.
>Uhm, BTW: Why are you checking for tempfile at all? A grep for "tempfile"
>revealed, that you always do:
>L_TMPFILE=3D`tempfile 2>/dev/null` || L_TMPFILE=3D/tmp/temp$$
>So, if tempfile cannot be run or yields an error, you set the tempfile name
>in the portable way J=F6rg mentioned.
There is no reason to use tempfile at all as I see no improvement with tempfile
compared to a standard solution.
>Also I wonder why you are using "mc" to view a file. I'd suggest to use
>less. And for users of real unices who are stuck with more, more should be
>used.
If you like your application to be usable (and accepted) by many people,
use standard tools. There is no 'less' on UNIX! If you need more, use more.
If you like the user to be able to use a different pager, check $PAGER.
*********** Here is something that leads us back to the TAR discussion **********
.... So I should add some final notes on the TAR discussion. Note that I am doing
this in this thread, because I hope not to restart the TAR thread this way.
The big problem with FSF (official GNU) is that FSF likes to _force_ users to use
FSF Programs anywhere. This is _very_ similar to what M$ does. There is no
difference from taking money for the tools or not if you only look at this
point.
My main goal is that people should be able to use what they prefer, but the
defaults should be the standarards (POSIX & OpenGroup) and _not_ FSF. At least
when there is a diference between FSF tools and the standards.
If you did not yet get my message from the TAR discussion, I repeat it in different
words:
Use whatever TAR program you like to use.
However, if "your favorite" TAR program is not able to extract TAR archives
don't piss on me! Simply send a bug report to the maintainer of "your
favorite" TAR program.
*********************************************************************************
As it seems that people who know nothing but Linux have problens to find out
what is nonstandard on Linux, here is the ultimate link for the official
behavior of *NIX:
http://www.opengroup.org/onlinepubs/7908799/
>J=F6rg: Does the plain, old sh support functions in shell scripts? If not,
Of course: This feature has been added around 1982-1984
>than the memoria-cd script might print a message like:
>"Please upgrade your shell to something usable like bash. Cannot go on."
Using the word "upgrade" is very very quetionable in this context.
If you overwrite /bin/sh with bash or if you modify the root account
to use any other shell than sh (note that this is even /sbin/sh on modern
UNIXes - /sbin/ is the static binaries directory - All programs in /sbin
need to be able to work in single user mode when there are no shared libraries
available) you may completely corrupt your installation forcing a re-install
from CD.
>J=F6rg: Does the ps on "real" Unices support this: ps ax --sort=3Dppid ?
NO: UNIX does not suport 'ps ax' at all AFAIK, Linux has no standard compliant
pa at all.
Look at: http://www.opengroup.org/onlinepubs/7908799/xcu/ps.html
for the official behavior of 'ps'.
>Gleydson: The amount of system memory can be calculated by:
>ls -lh /proc/kcore | awk '{ print $5 }' | sed 's|M||'
****************
STOP! /proc holds information on processes and _not_ information on the
system.
*********
>Yes, this is not portable. Is this more portable?
>free | grep 'Mem:' | awk '{ print $2 }' | sed 's|M||'
There is no 'free' program!
The most portable way is:
cat /var/adm/messages* | grep 'mem ' ...
But:
- This does not work on Linux because it uses nonstandard places
for log files.
- If a machine is 'up' for a long time the needed information has been
scrolled out.
J�rg
EMail:[EMAIL PROTECTED] (home) J�rg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni) If you don't have iso-8859-1
[EMAIL PROTECTED] (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]