LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   What are the best C-based utilities for the terminal? (https://www.linuxquestions.org/questions/programming-9/what-are-the-best-c-based-utilities-for-the-terminal-4175698586/)

dptzippy 08-01-2021 01:02 PM

What are the best C-based utilities for the terminal?
 
I am working on a personal project, where I try to implement the features of a C-based utility, but in my own way, in my own project. I am trying to learn C, and I am learning a lot by reading what others created, and I am looking for some interesting ones to use.

I am looking for command-line based tools, written in C.
I don't know if this is the right forum for my question, but I thought that "programming" would be the appropriate location for a question that pertains to programming. :P

Thanks!

rtmistler 08-01-2021 01:20 PM

Many command line tools are written in C.

Why not look up the source.

business_kid 08-01-2021 01:33 PM

You need to get into the 'gnu' part of gnu/linux aka linux the OS we use here

Nearly all early command line stuff is C or C/C++. You could switch your user to the csh shell instead of bash. All your basic commands go in the shell, and ytou will find extras for C usage but what you will find important is well commented C or C++. Some routines have a very logical flow, except there's a sudden mess in the flow. That often happens when a bug is discovered and has to be patched.

I only wrote Assembler and plc stuff in any bulk, and got to commenting it very often for one simple reason. If I ever was forced back to it, I wouldn't have a clue what I had been talking about, thinking, or doing and there would be a problem. So I needed comments to remind myself, never mind telling others.

boughtonp 08-01-2021 01:37 PM


 
This might be the opposite of what you're asking, but perhaps still of interest - it breaks down how the commands from GNU coreutils work: http://www.maizure.org/projects/decoded-gnu-coreutils


NevemTeve 08-02-2021 01:50 AM

> What are the best C-based utilities for the terminal?

There's plenty of them; if you're asking for learning purposes, start with true(1) and false(1).

dugan 08-02-2021 01:46 PM

This is written in C:

https://github.com/MusicPlayerDaemon/mpc

A lot of the newer CLI tools are written in Go or Rust.

Mechanikx 08-02-2021 11:57 PM

Quote:

Originally Posted by boughtonp (Post 6271476)
This might be the opposite of what you're asking, but perhaps still of interest - it breaks down how the commands from GNU coreutils work: http://www.maizure.org/projects/decoded-gnu-coreutils


This is fantastic! Thank you.

Michael Uplawski 08-03-2021 12:38 AM

What are the best C-based utilities for the terminal?

Those that I have programmed, myself. Of course.

You have to read the first post to understand that the question is not the question. :( Which banana is the best, when you only have plums.


All times are GMT -5. The time now is 05:51 PM.