Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Deleting files using GNU awk
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

Report this thread to moderator Post Follow-up to this message
Old Post
mickey
03-20-04 01:24 AM


Re: Deleting files using GNU awk

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


Report this thread to moderator Post Follow-up to this message
Old Post
Ed Morton
03-20-04 01:24 AM


Re: Deleting files using GNU awk
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

Report this thread to moderator Post Follow-up to this message
Old Post
mickey
03-20-04 01:24 AM


Re: Deleting files using GNU awk
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'.




Report this thread to moderator Post Follow-up to this message
Old Post
Cesar Rabak
03-20-04 01:24 AM


Re: Deleting files using GNU awk
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.

Report this thread to moderator Post Follow-up to this message
Old Post
Ted Davis
03-20-04 01:24 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

AWK archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:35 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.