[LINUX] Summary of "nl command Advent Calendar 2020"

nl command Advent Calendar 2020 スクリーンショット 2020-12-26 17.03.31.png


Summary of each article


Articles for beginners

--12/1 First nl command --12/2 Implementation of various nl commands --12/3 Check how to use nl command

This area is not limited to nl, but I think it is common to all commands.


Option commentary article

--12/4 n option of nl command to change line number format --12/5 w option of nl command to change the number of digits of line number --12/6 s option of nl command to change line number separator --12/9 d option of nl command to change section delimiter string --12/10 b, f, h options of nl command to change line numbering method --12/12 v option of nl command to change the initial value of line number --12/13 i option of nl command to change the increment value of line number --12/14 p option of nl command that does not reset line number for each logical page --12/16 l option of nl command to change the unit of blank line to add line number

There are 11 options and I wrote 9 articles.


Behavior commentary article

--12/7 Handling blank lines with nl command --12/8 Logical page of nl command --12/11 Use regular expressions in nl command --12/15 Sequential number control of nl command --12/17 Disable logical page of nl command --12/19 Maximum value of nl command

I wrote about basic operating specifications and precautions.


Articles on alternatives

--12/18 Find a prime number with the nl command

Try using nl instead of seq.

--12/20 Alternate nl command in editor --12/21 Substitute nl command with script --12/22 Substitute nl command with various commands

nl with another command.


Other articles

--12/23 Nl command processing performance

I tried to compare the performance. grep and cat are too fast.

--12/24 Participate in nl command development --12/25 Future nl command

This article is not limited to nl, but is for improving commands.


Contribution to other Advent Calendar

NetBSD AC --12/23 NetBSD nl command and Problem Reports

POSIX incompatibility and bug report story.

AIIT (Advanced Institute of Industrial Technology) AC

--12/23 nl command learned at AIIT (Advanced Institute of Industrial Technology)

Poem that summarizes past stories.


Looking back


Display stations on the Yokohama Line

Shell art that is especially fond of. I wanted to try it because I can now do -i 0 with nl in coreutils.

BSD


$ nl -w 1 -v 0 -i 0 -b p'[Kawayama Kikushin Kamoda Aibashi Hachikata]' yokohamaline | nl -w 1 -i 0 | tr '01' 'Pleasant each' | expand
Each Kai Higashi Kanagawa
Each large mouth
Each pleasant Kikuna
Each Kai Shin-Yokohama
Each small desk
Each pleasant Kamoi
Each Kainakayama
Each Tokaichiba
Each pleasant Nagatsuta
Each Naruse
Each pleasant Machida
Each Kobuchi
Each Fuchinobe
Each Yabe
Each pleasant Sagamihara
Each pleasant Hashimoto
Each pleasant Aihara
Each Kai Hachioji Minamino
Each pleasant Katakura
Each pleasant Hachioji

Defect report

-- -d bug in coreutils nl --Insufficient documentation for inf tokens in coreutils seq and sleep --POSIX incompatible with -s option on NetBSD (macOS) nl

I was reporting in real time the bugs I found during the verification while writing the article. For those whose revision policy was fixed during the serialization, past articles have also been revised and added.


Articles I couldn't write this time

--Why is coreutils cat -n so fast? --FreeBSD nl --BusyBox build options --Combine with pr --History of POSIX formulation

This time, I couldn't write an article because of lack of research. I may write it soon.


Impressions

――As a result, the software quality has improved, so I'm glad I did it. ――The more you look up, the more you don't understand -** nl command I don't understand at all **


The end


Recommended Posts

Summary of "nl command Advent Calendar 2020"
Lazy advent calendar 2019
Linux Command Summary
Future nl command
Docker command summary
Summary of tools used in Command Line vol.8
Summary of tools used in Command Line vol.5
memorandum of vi command
Summary of Tensorflow / Keras
Summary of pyenv usage
Looking back on the transition of the Qiita Advent calendar
[Linux] Basic command summary
Summary of string operations
nl command processing performance
Summary of Python arguments
[Infrastructure] While command summary
Find, locate command summary
Image related command summary
Summary of logrotate software logrotate
Summary of test method
Summary of python file operations
Summary of Python3 list operations
2017.3.6 ~ 3.12 Summary of what we did
Convenient usage summary of Flask
Participate in nl command development
Basic usage of Pandas Summary
Debug output of chalice command
A brief summary of Linux
Summary of Proxy connection settings
[Learning memo] Django command summary
[Linux] User / group command summary