So sprach Gleydson Mazioli da Silva am Sat, Jun 16, 2001 at 10:40:20PM -0400:
> 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.
Uhm, BTW: Why are you checking for tempfile at all? A grep for "tempfile"
revealed, that you always do:
L_TMPFILE=`tempfile 2>/dev/null` || L_TMPFILE=/tmp/temp$$
So, if tempfile cannot be run or yields an error, you set the tempfile name
in the portable way J�rg mentioned.
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.
J�rg: Does the plain, old sh support functions in shell scripts? If not,
than the memoria-cd script might print a message like:
"Please upgrade your shell to something usable like bash. Cannot go on."
Gleydson: At the beginning of the 'memoria-cd' script, you calculate:
if [ $(echo \(${SYS_MEM}-\(${CACHE}*${WRITTERS}\)\)-4|bc) -lt 0 ];then
The error message that you print doesn't really help. IMHO it would be
better, if you'd also say that the error is because there isn't enough
SYS_MEM set apart. And the * in the line should be escaped, I think.
J�rg: Does the ps on "real" Unices support this: ps ax --sort=ppid ?
Gleydson: The amount of system memory can be calculated by:
ls -lh /proc/kcore | awk '{ print $5 }' | sed 's|M||'
Yes, this is not portable. Is this more portable?
free | grep 'Mem:' | awk '{ print $2 }' | sed 's|M||'
Okay, other than that, the program looks good. Not that I might use it,
because I'm not burning multiple images at the same time, but for people who
do so, it might be quite handy.
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die g�nstige Art an Linux Distributionen zu kommen
Uptime: 18 hours 6 minutes
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]