Score:0

How do I pipe grep commands with a "-" without it being interpreted as an option?

ly flag

I'm using a Kali Linux distribution and I'm trying to learn how to use the | character for piping using grep. If I wanted to search the hashcat help file for what -a means for example, how would I do so without -a being considered an option to grep? I successfully used hashcat --help | grep 3000 to find out what hash mode 3000 means. But if I wanted to quickly search the help for -a how would I do so? I'm under the impression it might have something to do with regular expressions vs extended expressions but I don't really understand them.

sudodus avatar
jp flag
Tip: Your question is relevant for Ubuntu, but by mentioning Kali, people will vote to close your question, because AskUbuntu is strictly about Ubuntu.
Score:0
jp flag

It is common to use -- to stop looking for options. See the following examples

man df|grep --color -- '-'

and

man df|grep --color -- '-a'
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.