ShellHacks
Command-Line Tips and Tricks

text-processing

  • Blog

Find Out Text File Line Endings – LF or CLRF

Posted on March 23, 2022March 23, 2022by admin

A newline (also known as a line ending, end of line (EOL) or line break) is a character used to represent the end of a line of text and the beginning of a new line. Text files created on DOS/Windows machines have different line endings than files created on Unix/Linux. This note shows how to […]

Read More
No comments yet
  • Blog

Vi/Vim – Backspace Not Working

Posted on April 21, 2020November 30, 2021by admin

If you try to delete characters in the insert mode with the backspace key in vi/vim text editor, this sometimes may not work. Even though this is not a bug but a feature of vi/vim, you may still want to fix a backspace that is “not working”. In this small note i will show how […]

Read More
5 Comments
  • Blog

Sublime Text: Install Package (Plugin) – Package Control

Posted on March 20, 2019December 2, 2021by admin

Sublime Text is one of the most popular code editors with a lot of built-in features. The functionality of Sublime Text can be extremely extended by hundreds of useful plugins. The easiest way to install a package (plugin) for Sublime Text is to use Package Control – the package manager for Sublime Text.

Read More
No comments yet
  • Blog

Vi/Vim – Arrow Keys Don’t Work – Print Letters in Insert Mode

Posted on November 5, 2018April 21, 2020by admin

By default, vi/vim text editor uses the h, j, k and l keys for navigation. Hitting arrow keys in the insert mode will insert newlines and print A, B, C, D capital letters. In this small note i will show how to fix not working arrow keys, that print letters in the insert mode in […]

Read More
3 Comments
  • Blog

RegEx: Find IP Addresses in a File Using Grep

Posted on December 27, 2016March 18, 2017by admin

Here are some regular expressions that will help you to perform a validation and to extract all matched IP addresses from a file. The following regular expressions match IPv4 addresses. Matched IP addresses can be extracted from a file using grep command. In this article you’ll find a regular expressions themselves and an example of […]

Read More
19 Comments
  • Blog

SED/AWK – Add to the End or Beginning of a Line

Posted on December 27, 2016March 19, 2017by admin

From time to time it is required to modify some file very fast. And it goes without saying that the most popular command line tools for this in Linux are sed and awk – the two best text processing programs. In the following article, you’ll find an information about how to add some text, character […]

Read More
13 Comments
  • Blog

RegEx: Find Email Addresses in a File using Grep

Posted on December 27, 2016February 24, 2017by admin

Here is a best regular expression that will help you to perform a validation and to extract all matched email addresses from a file. This regular expression matches 99% of the email addresses in use nowadays. In this article you’ll find a regular expression itself and an example of how to extract matched email addresses […]

Read More
9 Comments
  • Blog

Removing First and Last Characters From Strings in Bash

Posted on December 27, 2016February 24, 2017by admin

From the following article, you’ll learn how to remove first characters from the beginning of each line in Bash and how to print strings between first and last characters using cut command. You’ll also learn how to remove last characters of each line using trick with reverse command. I’ve created a file with the following […]

Read More
2 Comments
  • Blog

AWK: Print Column – Change Field Separator – Linux Bash

Posted on December 27, 2016August 17, 2017by admin

The awk is a powerful Linux command line tool, that can process the input data as columns. In the following note i will show how to print columns by numbers – first, second, last, multiple columns etc. I will show how to change the default field separator in awk. At the end of this article […]

Read More
5 Comments
  • Blog

Grep OR – Grep AND – Grep NOT – Match Multiple Patterns

Posted on December 27, 2016March 19, 2017by admin

The grep, egrep, sed and awk are the most common Linux command line tools for parsing files. From the following article you’ll learn how to match multiple patterns with the OR, AND, NOT operators, using grep, egrep, sed and awk commands from the Linux command line. I’ll show the examples of how to find the […]

Read More
5 Comments

Posts navigation

Older posts

Online Tools

  • Base64 Decode
  • Base64 Encode

Tags

access-control anonymity ansible apache archive arduino artifactory bash boot cmd command-line curl dns docker encryption git gitlab helm java jenkins kubernetes linux macos mail mongodb mysql network openssl pdf php powershell prometheus python raspberry pi ssh sublime text systemd telegram telnet text-processing tor tsm windows wordpress yum
  • Telegram
  • Twitter
  • RSS
Privacy
Copyright © 2011-2022 | www.ShellHacks.com