ignoreutils

For discussions about programming and projects not necessarily associated with Porteus.
pterid
Contributor
Contributor
Posts: 119
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce on ext4 USB

ignoreutils

Post#1 by pterid » 22 Aug 2026, 15:01

Hello Porteus friends! Hope you are all doing well in your lives.

Every time I want to do something in the terminal, and I don't succeed to do it quickly with Bash and existing command-line tools, I hand-write a little C program to do it. It has been a nice way to learn basic C, and get some small working tools for my own workflows. I recommend it. :)

I put a few of them together with manpages and a makefile, as "ignoreutils" - named with respect to coreutils and moreutils packages, these being utils that you can probably ignore.

https://codeberg.org/lcpterid/ignoreutils

Current list:
  • caser - Changes the case of text
  • mathfont - Changes Latin and Greek letters and numbers to Unicode math characters
  • hr - Makes a horizontal line across your terminal, with customisable ends and a centred message
  • coin - Returns exit code 0 or 1 at random, with success probability of your choice
  • bycontains - Returns whether one file's content is contained completely with another file
  • byget - Gets a single byte from a given location in a file
  • byset - Outputs a file, changing only one byte at a given location
  • byseq - Generate binary sequences. Can be useful junk data for experiments with file storage or compression
  • byreplace - Replace a portion of a file with the contents of another file, at a given location
  • byinsert - Insert the contents of one file into another, at a given location
  • byreverse - Reverse a file bytewise
  • emoji - Search emoji by their standard description
  • stem - Identify the common stem of all lines in a file
  • leaves - Complementary output to stem: print a file with any common stem removed
  • strep - Replace every instance of one string with another in a file. No regex.
To build for Porteus: get 05-devel.xzm from a Porteus mirror and activate it, then do:

Code: Select all

git clone https://codeberg.org/lcpterid/ignoreutils.git
cd ignoreutils
DESTDIR=build-porteus make install
cd build-porteus
sudo dir2xzm build-porteus ignoreutils-0.0.1.xzm
and then if it builds the xzm correctly, activate it or move it to your usual modules folder.

If you happen to have the optional Porteus module for local docs 06-man.xzm, then you can use the man command to see the ignoreutils manpages, but you may need to (sudo) edit /etc/man_db.conf and remove the hash (#) from the beginning of the line:

Code: Select all

#MANDATORY_MANPATH                       /usr/share/man
or alternatively you can force the ignoreutils manpages to be in /usr/man by setting DOCDIR when you run the make step:

Code: Select all

DESTDIR=build-porteus DOCDIR=/usr/man make install
Thanks for reading, feedback is welcome!

pterid
Contributor
Contributor
Posts: 119
Joined: 01 Feb 2025, 20:13
Distribution: Porteus 5.01 Xfce on ext4 USB

ignoreutils

Post#2 by pterid » 06 Oct 2026, 12:18

New version 0.0.2 with a new tool drip: a slow streamer by byte/char/word/line - the streaming by word option makes it look like a chatbot is streaming the file to you - hooray

https://codeberg.org/lcpterid/ignoreutils/tags

Post Reply