* Greg Olszewski <[EMAIL PROTECTED]> writes:
> doops. I meant to put the FILE=$1 inside the while loop.
Ah. So what 'shift' does is to replace the contents of $1 with $2, so
you can get to whatever is in $2 by calling $1. Now I get it... I
think. :)
> So this should work. (Like you don't have enough solutions already :-) )
Yeah, I thought the hard thing would be working out "how" to do it,
not, "which solution to use".
> TMPFILE=$(mktemp /tmp/tmp.XXXXX)
This gave me a 'command not found' error. 'mktemp' doesn't exist on
my system... but...
,----[ man 3 mktemp ]
| SYNOPSIS
| #include <stdlib.h>
|
| char *mktemp(char *template);
|
| DESCRIPTION
| The mktemp() function generates a unique temporary file
| name from template. The last six characters of template
| must be XXXXXX and these are replaced with a string that
| makes the filename unique. Since it will be modified, tem-
| plate must not be a string constant, but should be
| declared as a character array.
`----
Is this what you are referring to? No, it can't be. There'd be no
way of calling a C function from a shell script. You must have a
utility called "mktemp" that does a similar thing to the C function
"mktemp".
===========================
Want to really learn Linux?
... Install Slackware
===========================
--
|---<Regards, Steve Youngs>-------------------------------------|
| Genius is the ability to |
| reduce the complicated to the simple |
|------------------------------------<[EMAIL PROTECTED]>---|
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs