New answers tagged

3 votes

Command line tools to format tables

Is there anybody willing to review the code ... ? Yes, I am willing to do so :) Layout Much of the code posted into the question lacks indentation. It looks like there may have been a problem when ...
toolic's user avatar
  • 3,141
3 votes

Listing first 50 big files in directory and print relative paths and sizes

filter You do: dir | sort | select50 Can this be simplified or optimised ? Yes, by sorting fewer entries: ...
J_H's user avatar
  • 24.9k
2 votes

Multiline string concatenation

A while ago I created the same function. I was creating a number of formatting functions, and found working against str or Any ...
Peilonrayz's user avatar
  • 43.3k
3 votes

This is a simple stopwatch cli application with a few options

This looks silly at first: #define ONE_MILLION_NSEC 1000000 #define ONE_BILLION_NSEC 1000000000 But considering that you cannot yet write 1'000'000 in C, this will ...
Cris Luengo's user avatar
  • 5,573
6 votes
Accepted

This is a simple stopwatch cli application with a few options

Check the return value of library functions From the man page: signal() returns the previous value of the signal handler. On failure, it returns SIG_ERR, and errno is set to indicate the error. ...
Harith's user avatar
  • 5,647

Top 50 recent answers are included