Need advice about which tool to choose?Ask the StackShare community!

AWK

541
49
+ 1
0
Clojure

1.9K
1.4K
+ 1
1.1K
Add tool

AWK vs Clojure: What are the differences?

Developers describe AWK as "A language for text processing, data extraction and reporting". A data-driven scripting language consisting of a set of actions to be taken against streams of textual data – either run directly on files or used as part of a pipeline – for purposes of extracting or transforming text, such as producing formatted reports. On the other hand, Clojure is detailed as "A dynamic programming language that targets the Java Virtual Machine". Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.

AWK and Clojure can be categorized as "Languages" tools.

AWK and Clojure are both open source tools. It seems that Clojure with 7.89K GitHub stars and 1.25K forks on GitHub has more adoption than AWK with 206 GitHub stars and 41 GitHub forks.

According to the StackShare community, Clojure has a broader approval, being mentioned in 116 company stacks & 422 developers stacks; compared to AWK, which is listed in 3 company stacks and 7 developer stacks.

Decisions about AWK and Clojure
Justin Dorfman
Open Source Program Manager at Reblaze · | 1 upvote · 81K views

If you have a file (demo.txt) that has 3 columns:

Column-1    Column-2    Column-3
Row-1a      Row-2a      Row-3a         
Row-1b      Row-2b      Row-3b
Row-1c      Row-2c      Row-3c
Row-1d      Row-2d      Row-3d
Row-1e      Row-2e      Row-3e

and you want to only view the first column of the file in your CLI, run the following:

awk {'print $1'} demo.txt

Column-1
Row-1a
Row-1b
Row-1c
Row-1d
Row-1e

If you want to print the second column of demo.txt, just replace $1 with $2

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of AWK
Pros of Clojure
    Be the first to leave a pro
    • 117
      It is a lisp
    • 100
      Persistent data structures
    • 100
      Concise syntax
    • 90
      jvm-based language
    • 89
      Concurrency
    • 81
      Interactive repl
    • 76
      Code is data
    • 61
      Open source
    • 61
      Lazy data structures
    • 57
      Macros
    • 49
      Functional
    • 23
      Simplistic
    • 22
      Immutable by default
    • 20
      Excellent collections
    • 19
      Fast-growing community
    • 15
      Multiple host languages
    • 15
      Simple (not easy!)
    • 15
      Practical Lisp
    • 10
      Because it's really fun to use
    • 10
      Addictive
    • 9
      Community
    • 9
      Web friendly
    • 9
      Rapid development
    • 9
      It creates Reusable code
    • 8
      Minimalist
    • 6
      Programmable programming language
    • 6
      Java interop
    • 5
      Regained interest in programming
    • 4
      Compiles to JavaScript
    • 3
      Share a lot of code with clojurescript/use on frontend
    • 3
      EDN
    • 1
      Clojurescript

    Sign up to add or upvote prosMake informed product decisions

    Cons of AWK
    Cons of Clojure
      Be the first to leave a con
      • 11
        Cryptic stacktraces
      • 5
        Need to wrap basically every java lib
      • 4
        Toxic community
      • 3
        Good code heavily relies on local conventions
      • 3
        Tonns of abandonware
      • 3
        Slow application startup
      • 1
        Usable only with REPL
      • 1
        Hiring issues
      • 1
        It's a lisp
      • 1
        Bad documented libs
      • 1
        Macros are overused by devs
      • 1
        Tricky profiling
      • 1
        IDE with high learning curve
      • 1
        Configuration bolierplate
      • 1
        Conservative community
      • 0
        Have no good and fast fmt

      Sign up to add or upvote consMake informed product decisions

      What is AWK?

      A data-driven scripting language consisting of a set of actions to be taken against streams of textual data – either run directly on files or used as part of a pipeline – for purposes of extracting or transforming text, such as producing formatted reports.

      What is Clojure?

      Clojure is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system.

      Need advice about which tool to choose?Ask the StackShare community!

      What companies use AWK?
      What companies use Clojure?
      See which teams inside your own company are using AWK or Clojure.
      Sign up for StackShare EnterpriseLearn More

      Sign up to get full access to all the companiesMake informed product decisions

      What tools integrate with AWK?
      What tools integrate with Clojure?

      Sign up to get full access to all the tool integrationsMake informed product decisions

      Blog Posts

      GitHubGitPython+22
      17
      14209
      GitHubGitDocker+34
      29
      42447
      What are some alternatives to AWK and Clojure?
      Python
      Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
      Perl
      Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more.
      JavaScript
      JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
      Git
      Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
      GitHub
      GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
      See all alternatives