Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

less-unix

How do I keep colors when piping “jq” output to “less”?

June 2, 2023 by Tarik

It is jq that is suppressing the colours. From the man page o –color-output / -C and –monochrome-output / -M: By default, jq outputs colored JSON if writing to a terminal. You can force it to produce color even if writing to a pipe or a file using -C, and disable color with -M So, … Read more

Categories linux Tags jq, less-unix, linux, pipe, unix Leave a comment

less-style markdown viewer for UNIX systems

April 23, 2023 by Tarik

Pandoc can convert Markdown to groff man pages. This (thanks to nenopera’s comment): pandoc -s -f markdown -t man foo.md | man -l – should do the trick. The -s option tells it to generate proper headers and footers. There may be other markdown-to-*roff converters out there; Pandoc just happens to be the first one … Read more

Categories node.js Tags bash, less-unix, markdown, node.js, unix Leave a comment

How do you do a case insensitive search using a pattern modifier using less?

September 26, 2022 by Tarik

You can also type command -I while less is running. It toggles case sensitivity for searches.

Categories unix Tags case-insensitive, less-unix, search, unix Leave a comment

Going to a specific line number using Less in Unix

September 17, 2022 by Tarik

With n being the line number: ng: Jump to line number n. Default is the start of the file. nG: Jump to line number n. Default is the end of the file. So to go to line number 320123, you would type 320123g. Copy-pasted straight from Wikipedia.

Categories shell Tags less-unix, search, shell, unix Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa