unix commands and perl modules war
jesuashok
created: 2006-04-07 05:22:53
War Started Between Unix and Perl

unix starts arrowing on perl, let us see how perl tackles that
find -> File::Find
cp -> File::Copy
grep -> File::Grep
df -> Filesys::DiskSpace
rm -> File::Remove
time -> Benchmark
bash -> Shell
set -> debug
ping -> Net::Ping
ftp -> Net::FTP
telnet -> Net::Telnet
sort -> sort
diff -> Text::Diff
unique -> Array::Unique
date -> Time
mail -> Net::SMTP
ssh -> Net::SSH
scp -> Net::SCP
.
.
.
.
.
It goes on


Judges are
-------------
Industiralists
Software Developers
Business men


Result :-
Healthy Competition

"Keep pouring your ideas"
Re: unix commands and perl modules war
created: 2006-04-07 10:02:05
I add:

snmp -> Net::SNMP
Re: unix commands and perl modules war
created: 2006-04-07 12:26:14

I haven't noticed a module to do the work of *mv* across file system mount points. If anybody knows of one (besides issuing a call to *mv*), please let me know.

Re^2: unix commands and perl modules war
created: 2006-04-07 13:27:57
Worse still, there's no flag you can give mv to stop it moving across file systems!
"This is the Unix philosophy:

    Write programs that do one thing and do it well.
    Write programs to work together.
    Write programs to handle text streams, because that is a universal interface." 

So mv is a wrapper around the rename() system call but it also includes cp -r and rm -r whether you want them or not. It wouldn't be so bad if it was a reversible operation but if any of your files were hard links then you're screwed.

Re: unix commands and perl modules war
created: 2006-04-07 12:32:07

du -> Filesys::DiskUsage

(I think I've flogged this module more than its author has ;->)

parv - File::Copy has a mv function that does what you want (according to its POD)

Re^2: unix commands and perl modules war
created: 2006-04-07 12:42:22

Darn, yes that it seems; i have to try it. I must be remembring *rename()*. Sorry for the noise.

Re: unix commands and perl modules war
created: 2006-04-14 05:28:51
Interestingly I have just started to work on File::Tools and Pipe that might be interesting for you.

perlmonks.org content © perlmonks.org and fergal, jesuashok, parv, szabgab, Tanktalus, tux300181

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03