SlideShare a Scribd company logo
1 of 6
Download to read offline
Why bash+awk+sed+..., when you can use Perl? ;)


                 Luciano Rocha



                 June 6th, 2008
Introduction




    1   There can be only one!



    2   Why reinvent the wheel?



    3   No more glue!



    4   Vrooom!
There can be only one! (or, Portability)




    Perl is more portable!
    Different operating systems have different versions of the basic tools:
         Is /bin/sh bash? dash? ...?
         Does ‘xargs -r’ work?
         Does ‘find’ assume ‘.’? Does it have the printf formats you need?
         Does ‘sed -i‘ work?
         Must options always come first?
Why reinvent the wheel? (or, Work intelligently)




    Use other people’s work
        Extensive documentation with great examples.
        CPAN is huge!
        Cookbooks!
No more glue!




    Getting tired of typing long lines?
    If you’re going to write a script, use a portable and powerful language.
    And don’t depend on external commands that may not work the same
    between platforms, breaking your scripts.
Vrooom! (or, It’s fast)




    Perl is faster
    Ignoring start overhead, the same algorithms will be faster in Perl than in a
    combination of shell, sed, awk and other things.


    Don’t torture yourself
    A proper programming language, with associative arrays, most of POSIX
    functions, and a extensive library.

More Related Content

Viewers also liked

The Power Of Lisp Macros
The Power Of Lisp MacrosThe Power Of Lisp Macros
The Power Of Lisp Macros
Masaomi CHIBA
 
Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008
Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008
Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008
Maria Ptak
 
Thinking about Thinking
Thinking about ThinkingThinking about Thinking
Thinking about Thinking
Jennifer Orr
 
D2.1 Evaluation Criteria and Methods
D2.1	 Evaluation Criteria and MethodsD2.1	 Evaluation Criteria and Methods
D2.1 Evaluation Criteria and Methods
Hendrik Drachsler
 

Viewers also liked (20)

Kkka1
Kkka1Kkka1
Kkka1
 
Refik Saydam Hifzisihha Merkezinin TanıDaki Rolu
Refik Saydam Hifzisihha Merkezinin TanıDaki RoluRefik Saydam Hifzisihha Merkezinin TanıDaki Rolu
Refik Saydam Hifzisihha Merkezinin TanıDaki Rolu
 
The Power Of Lisp Macros
The Power Of Lisp MacrosThe Power Of Lisp Macros
The Power Of Lisp Macros
 
Anuario Jaye
Anuario JayeAnuario Jaye
Anuario Jaye
 
Wolverine
WolverineWolverine
Wolverine
 
Miejsca opuszczone
Miejsca opuszczoneMiejsca opuszczone
Miejsca opuszczone
 
Risk management v imp
Risk management v impRisk management v imp
Risk management v imp
 
San Diego Japan Bio Forum: ライフサイエンス向けデータ可視化技術の現状
San Diego Japan Bio Forum: ライフサイエンス向けデータ可視化技術の現状San Diego Japan Bio Forum: ライフサイエンス向けデータ可視化技術の現状
San Diego Japan Bio Forum: ライフサイエンス向けデータ可視化技術の現状
 
kumamoto food
kumamoto foodkumamoto food
kumamoto food
 
Not A Spy
Not A SpyNot A Spy
Not A Spy
 
We love Aso!
We love Aso!We love Aso!
We love Aso!
 
Ailehekimligianketi
AilehekimligianketiAilehekimligianketi
Ailehekimligianketi
 
Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008
Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008
Zakonczenie studiow podyplomowych: INFORMATYKA 2007/2008
 
M02 un05 p01
M02 un05 p01M02 un05 p01
M02 un05 p01
 
Collecting and utilizing assessment information
Collecting and utilizing assessment informationCollecting and utilizing assessment information
Collecting and utilizing assessment information
 
Thinking about Thinking
Thinking about ThinkingThinking about Thinking
Thinking about Thinking
 
Cloudcamp- The World Wide Cloud
Cloudcamp- The World Wide CloudCloudcamp- The World Wide Cloud
Cloudcamp- The World Wide Cloud
 
D2.1 Evaluation Criteria and Methods
D2.1	 Evaluation Criteria and MethodsD2.1	 Evaluation Criteria and Methods
D2.1 Evaluation Criteria and Methods
 
D2.2.1 Evaluation Framework
D2.2.1 Evaluation FrameworkD2.2.1 Evaluation Framework
D2.2.1 Evaluation Framework
 
Open Educational Resources and Practices for Higher Education
Open Educational Resources and Practices for Higher EducationOpen Educational Resources and Practices for Higher Education
Open Educational Resources and Practices for Higher Education
 

More from Luciano Rocha (7)

Agile Memcached
Agile MemcachedAgile Memcached
Agile Memcached
 
Perl From Vi, Part I
Perl From Vi, Part IPerl From Vi, Part I
Perl From Vi, Part I
 
Gil - Virtualisation and High Availability
Gil - Virtualisation and High AvailabilityGil - Virtualisation and High Availability
Gil - Virtualisation and High Availability
 
Gil - LiveCDs and Virtualisation, 2006
Gil - LiveCDs and Virtualisation, 2006Gil - LiveCDs and Virtualisation, 2006
Gil - LiveCDs and Virtualisation, 2006
 
Gil - LiveCDs and Virtualisation, 2005
Gil - LiveCDs and Virtualisation, 2005Gil - LiveCDs and Virtualisation, 2005
Gil - LiveCDs and Virtualisation, 2005
 
Managing Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and SubversionManaging Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and Subversion
 
Why Perl, when you can use bash+awk+sed? :P
Why Perl, when you can use bash+awk+sed? :PWhy Perl, when you can use bash+awk+sed? :P
Why Perl, when you can use bash+awk+sed? :P
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 

Why bash+awk+sed+..., when you can use Perl? ;)

  • 1. Why bash+awk+sed+..., when you can use Perl? ;) Luciano Rocha June 6th, 2008
  • 2. Introduction 1 There can be only one! 2 Why reinvent the wheel? 3 No more glue! 4 Vrooom!
  • 3. There can be only one! (or, Portability) Perl is more portable! Different operating systems have different versions of the basic tools: Is /bin/sh bash? dash? ...? Does ‘xargs -r’ work? Does ‘find’ assume ‘.’? Does it have the printf formats you need? Does ‘sed -i‘ work? Must options always come first?
  • 4. Why reinvent the wheel? (or, Work intelligently) Use other people’s work Extensive documentation with great examples. CPAN is huge! Cookbooks!
  • 5. No more glue! Getting tired of typing long lines? If you’re going to write a script, use a portable and powerful language. And don’t depend on external commands that may not work the same between platforms, breaking your scripts.
  • 6. Vrooom! (or, It’s fast) Perl is faster Ignoring start overhead, the same algorithms will be faster in Perl than in a combination of shell, sed, awk and other things. Don’t torture yourself A proper programming language, with associative arrays, most of POSIX functions, and a extensive library.