How to Uppercase/Lowercase text with sed

sed is a common Linux/Unix utility used to parse and transform text. Below are examples of uppercasing and lowercasing text with sed: Uppercasing Text with sed

[a-z] is the regular expression which will match lowercase letters. \U& is used to replace these lowercase letters with the uppercase version. Lowercasing Text with sed

[A-Z]

read more

Convert JSON to TSV with jq

jq is a lightweight JSON command line processor that makes many JSON processing tasks very easy. A common task when working with JSON is to convert records into a TSV (tab delimited) format. Below are examples of how to convert JSON to TSV with jq. Converting JSON to TSV In order to convert JSON to

read more

Convert JSON to CSV with jq

jq is a lightweight JSON command line processor that makes many JSON processing tasks very easy. A common task when working with JSON is to convert records into a CSV format. Below are examples of how to convert JSON to CSV with jq. Converting JSON to CSV In order to convert JSON to CSV with

read more

How to checkout git tags

Tags in Git are a way to bookmark specific commits. This is often done to indicate different versions or releases of a project. There is no straight forward way to checkout a tag in Git. But you can checkout the specific commit associated with a tag that into a new branch. This will give you

read more

Writing Data from Apache Kafka to Text File

When working with Apache Kafka you might want to write data from a Kafka topic to a local text file. This is actually very easy to do with Kafka Connect. Kafka Connect is a framework that provides scalable and reliable streaming of data to and from Apache Kafka. With Kafka Connect, writing a topic’s content

read more

Writing Text File contents to Kafka with Kafka Connect

apache kafka logo

When working with Kafka you might need to write data from a local file to a Kafka topic. This is actually very easy to do with Kafka Connect. Kafka Connect is a framework that provides scalable and reliable streaming of data to and from Apache Kafka. With Kafka Connect, writing a file’s content to a

read more

Pushing Tags to a Remote Repository in Git

Tags in Git are a way to bookmark specific commits. This is often done to indicate different versions or releases of a project. When pushing to a remote repository tags are not included by default. To push a tag to the remote repository use: git push origin <tag name> To push all local tags to

read more

Linux sort Command Examples

What is Linux sort? sort is a very useful command line utility used to sort the lines of a file or input stream. sort can be used to sort input by entire lines, single columns, or different column ranges in a variety of ways. Sorting by Entire Lines The default behavior of the sort command

read more

Sending Key Value Messages with the Kafka Console Producer

When working with Kafka you might find yourself using the kafka-console-producer (kafka-console-producer.sh). The kafka-console-producer is a program included with Kafka that creates messages from command line input (STDIN). However, simply sending lines of text will result in messages with null keys. In order to send messages with both keys and values you must set the

read more

Creating a Simple Kafka Consumer

Apache Kafka is a fault tolerant publish-subscribe streaming platform that lets you process streams of records as they occur. If you haven’t installed Kafka yet, see our Kafka Quickstart Tutorial to get up and running quickly. In this post we will talk about creating a simple Kafka consumer in Java. Kafka Consumer Code The example

read more