(Video materials in preparation)
decomment : Delets comments.
Usage : decomment <file>
Version : Tue Jan 9 09:02:34 JST 2024
The command removes comments from a file specified by an argument,
or the standard input.
The command performs the following processes.
- Replaces continuous spaces and tabls into a single space.
- Removes the leading and trailing spaces.
- Removes the lines starting with '#'.
- When a '#' occurs right after a white space, removes after the white space.
- Removes the empty lines.
Use the decomment command to remove the comments from a here-document or
a hane-made data.
$ cat table
# This is a table for test.
# 1:region code 2: region name 3:block code
1 Tokyo A
2 Saitama A
3 Kanagawa B
# The following are listed in regionward.
101 Sorachi,_Hokkaido Z # A region of Hokkaido
102 Shiribeshi,_Hokkaido Z
103 Iburi,_Hokkaido Z
$ decomment table
1 Tokyo A
2 Saitama A
3 Kanagawa B
101 Sorachi,_Hokkaido Z
102 Shiribeshi,_Hokkaido Z
103 Iburi,_Hokkaido Z