Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Pathologically Eclectic Rubbish Lister
 
PerlMonks

unix commands and perl modules war

by jesuashok (Curate)
 | Log in | Create a new user | The Monastery Gates | Super Search | 
 | Seekers of Perl Wisdom | Meditations | PerlMonks Discussion | 
 | Obfuscation | Reviews | Cool Uses For Perl | Perl News | Q&A | Tutorials | 
 | Poetry | Recent Threads | Newest Nodes | Donate | What's New | 

on Apr 07, 2006 at 09:22 UTC ( #541826=perlmeditation: print w/ replies, xml ) Need Help??

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"

Comment on unix commands and perl modules war
Re: unix commands and perl modules war
by tux300181 (Hermit) on Apr 07, 2006 at 14:02 UTC
    I add:

    snmp -> Net::SNMP
Re: unix commands and perl modules war
by parv (Curate) on Apr 07, 2006 at 16:26 UTC

    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.

      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." 
      
      (my bolding)

      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
by Tanktalus (Canon) on Apr 07, 2006 at 16:32 UTC

    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)

      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
by szabgab (Curate) on Apr 14, 2006 at 09:28 UTC
    Interestingly I have just started to work on File::Tools and Pipe that might be interesting for you.

Login:
Password
remember me
What's my password?
Create A New User

Node Status?
node history
Node Type: perlmeditation [id://541826]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (21)
Corion
GrandFather
shmem
jdporter
Your Mother
toolic
holli
atcroft
eric256
kennethk
MidLifeXis
bmann
thezip
Eyck
broomduster
socketdave
hominid
ahmad
ssandv
je44ery
MikeDexter
As of 2010-02-09 20:43 GMT
Sections?
The Monastery Gates
Seekers of Perl Wisdom
Meditations
PerlMonks Discussion
Categorized Q&A
Tutorials
Obfuscated Code
Perl Poetry
Cool Uses for Perl
Perl News
Information?
PerlMonks FAQ
Guide to the Monastery
What's New at PerlMonks
Voting/Experience System
Tutorials
Reviews
Library
Perl FAQs
Other Info Sources
Find Nodes?
Nodes You Wrote
Super Search
List Nodes By Users
Newest Nodes
Recently Active Threads
Selected Best Nodes
Best Nodes
Worst Nodes
Saints in our Book
Leftovers?
The St. Larry Wall Shrine
Offering Plate
Awards
Craft
Snippets Section
Code Catacombs
Quests
Editor Requests
Buy PerlMonks Gear
PerlMonks Merchandise
Planet Perl
Perlsphere
Use Perl
Perl.com
Perl 5 Wiki
Perl Jobs
Perl Mongers
Perl Directory
Perl documentation
CPAN
Random Node
Voting Booth?

What level of existential comfort do you require?

Palace
Executive suite at the best hotel
Regular hotel in a decent part of town
Motel
Boarding house
Sleeping Bag on Couch in Basement
Any port in a storm
Camping under the freeway overpass
Jail
Other

Results (279 votes), past polls