[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Possible?! A Debian public repository for all complex code lines with examples and scripts?



On Fri 26 Mar 2021 at 19:11:24 (+0530), Susmita/Rajib wrote:
[ … ]
> 
> Even the book that I have procured — The Linux Command Line, A
> Complete Introduction, by William Shotts  — has all codes spread (or
> s[t]rewn) across many pages and has to be brought together by exhaustive
> note taking.

This is why books become "well-thumbed", as their users turn back and
forth to different sections.

> It is clearly noticed that wide applications of tricks with wildcards,
> regex and redirections aren't simply available in the man pages.

Correct. The man pages document fact that are specific to particular
commands. Wildcards, regex and redirections are features of the shell
that invokes them, and so are documented there.

> So is it then not necessary to have a repository of codes, with all
> permutations & combinations of possibilities with wildcards/regular
> expressions, redirections and so on, along with a wide variety of
> examples, be made available? Have the complete code reference hosted
> by the Debian server itself?

No. The way in which languages are generally described is by breaking
them down into their component parts, and devising general rules for
combining those parts. Fortunately the rules for computer languages
are much simpler and more limited than those for natural languages¹.
However, the shell's rules are messy because of the way it has
evolved. Most of us accept this because the advantages gained by
having the features are greater than the disadvantages of dealing
with the messiness and inconsistencies.

So it's up to you, and all other users of the language, to build
your own command lines out of those parts that you like, just as we
combine our favoured words into sentences (possibly containing
phrases and clauses).

> Is not this general unavailability of those more complex codes — then
> becomes a de-facto non-disclosure of complex code lines — against the
> very Policy of Free and Open Source systems?

I'm not aware of any scripts in Debian linux that are not available
for everyone to read. The only sense in which any of them are
unavailable is that there are so many to search through for the
hapax legomenon you seek.

> Doesn't this non-disclosure encourage secrecy unless one attends a
> paid course to learn those tricks, permutations and combinations of
> wildcards/regular expressions and redirections involving internal and
> external commands?

There's no secrecy here, just incomplete knowledge. You can increase
your knowledge through courses, or just by the experience that comes
with frequent use. Progress tends to be much more rapid if you do this
in the company of peers who can criticise each other. Along with your
knowledge of the language comes knowing where to look for more.

> Shouldn't all codes and tricks involving them be available for
> everyone to use, but still have the system so robust that it can't be
> hacked?

I assume that you're talking here about cryptography on open systems.
Much the same applies: the algorithms used by the programs are
well-known, and the secrecy is maintained by your not revealing the
keys. Robustness of the algorithms is supposed to be increased by
opening them up for scrutiny.

¹ For example, English has a "rule" for ordering adjectives which is
  learnt as part of growing up, but must seem mysterious to adult
  learners. Fortunately, most shell options don't have to be placed
  in an arbitrary fixed order.

  (The rule is opinion-size-age-shape-colour-origin-material-purpose.)

Cheers,
David.


Reply to: