On Wed, 2 Jun 2021 at 04:55, Francisco Tissera <audiogamer2004@xxxxxxxxx> wrote:
Is there a way to make that grep permanent? or would I have to type the
command including grep every time?
I seeTh some terse responses, but you will find that a few hours learning some basics
of the linux command-line well worth the effort. It will also help you avoid some of the
poor or even malicious examples posted on internet sites that can damage your system.
Good starting place are linuxcommand.org and Nemeth et al (many of us have
several editions):
Title: UNIX and Linux System Administration Handbook, 5th Edition, 2017
Authors:
Publisher: Addison-Wesley Professional
ISBN: 9780134278308
Linux follows the outline of UNIX, which was created at a time when terminals
were text only so all interactive work was done with a command line. One
guiding principle was that programming is mostly text processing. The
grep, sed, and awk programs were available from the early days and are still
widely used. Another innovation was "pipes" that allow you to chain together
a series of programs, typically starting with a program (e.g., "dnf") that generates
text and piping ("|") the output text to another program (e.g., "grep"). Yet another
innovation was regular expressions which provide compact (important when you
were working on an terminal with only 80 characters on a line and 24 or 25 lines)
patterns to match text strings.
Command-line processing is quite similar across linux distros and macOS. I
find Apple's command-line documentation
quite useful for users starting out with the linux command line. One keystroke
saving measure in UNIX is the use of the "PATH" to list directories that are
searched for a command. Today, many users end up with multiple versions of
programs (python is one that often exists in multiple versions) that are
used by the system as well as for applications. Apple recommends
reserving the PATH for "system" programs, and that user scripts and programs
be run using the full path. In your case, you might create a "dnf" script like one
of the examples posted here. If you put it in a directory on the "PATH", such as
"$HOME/bin", it could mask the real dnf, but if you put it in a directory that is not
in the PATH, say "$HOME/my" you can run it as "~/my/dnf" and avoid
conflicts. You can also name the script "mydnf" and put it in $HOME/bin, but
getting in the habit of using a full path with non-system programs avoids problems
that are often tricky to recognize on forum posts.
George N. White III
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure