Home > Archive > AWK > March 2004 > Deleting files using GNU awk
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Deleting files using GNU awk
|
|
| mickey 2004-03-19, 8:24 pm |
| Hello,
I have a couple of AWK scripts that are used on multiple platforms
(Linux, Windows, and *BSD). During their operation they generate a
number of intermediate files that I wuld like to delete at the end. Is
there a way to delete files using awk?
Thanks,
-M
| |
| Ed Morton 2004-03-19, 8:24 pm |
|
mickey wrote:
> Hello,
>
> I have a couple of AWK scripts that are used on multiple platforms
> (Linux, Windows, and *BSD). During their operation they generate a
> number of intermediate files that I wuld like to delete at the end. Is
> there a way to delete files using awk?
Use the awk "system" to call the shell "rm".
Ed.
> Thanks,
>
> -M
| |
| mickey 2004-03-19, 8:24 pm |
| Ed Morton wrote:
>
>
> mickey wrote:
>
>
>
> Use the awk "system" to call the shell "rm".
>
> Ed.
>
>
>
Is rm a standard command on windows too? I have it but because I have
the unxutils installed.
-M
| |
| Cesar Rabak 2004-03-19, 8:24 pm |
| mickey escreveu:
[snipped]
>
> Is rm a standard command on windows too? I have it but because I have
> the unxutils installed.
>
No, it is not. The commando in windows is 'del'.
| |
| Ted Davis 2004-03-19, 8:24 pm |
| On Fri, 12 Mar 2004 11:17:23 -0500, mickey <micky@hotmail.com> wrote:
>Ed Morton wrote:
>
>
>Is rm a standard command on windows too? I have it but because I have
>the unxutils installed.
You will have to detect the OS, or provide a translation batch file on
the Windows systems to respond to rm or a shell script (or maybe a
link) on the *ix machines to respond to del - in each case, the same
command can then be used regardless of OS. There are also rm
utilities available for Windows that mimic the *ix utility's syntax.
T.E.D. (tdavis@gearbox.maem.umr.edu)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.
|
|
|
|
|