Only Linux Brainlets CAT into GREP!!!

Only Linux Brainlets CAT into GREP!!!

Luke Smith

4 года назад

90,075 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Luke Smith
Luke Smith - 01.12.2019 23:17

Something I didn't say in the video:
`> file` will not output the file visually in all shells although it does make the file content available to commands like grep in all shells, like I illustrated. It does output the file in my shell (zsh) but it will not output it visually in bash or POSIX sh, although there might be a setting to enable it to do that in bash (I wouldn't know).

Ответить
cosmo
cosmo - 04.11.2023 13:59

i use "grep '' filenamae" to view files

Ответить
Howie Dick
Howie Dick - 17.10.2023 16:25

i was unaware that grep could take a file. however there is no way im going to use > to read a file...SEE THERE! ALREADY TYPO'ed IT! dang it.....

Ответить
Lassebq
Lassebq - 10.10.2023 10:31

Cat abuse!!!!

Ответить
Misha Zemskov
Misha Zemskov - 22.08.2023 00:22

You blew my mind, again! I am now going to conserve electricity and become a much more sensible person!

Ответить
CMDR Amiganer
CMDR Amiganer - 22.07.2023 20:46

I'm not one of those "cat grep" people. The switch "-H" in grep tells grep to give the filename the pattern is found in. with "-n" you can get even the linenumber.
Thos "direct filenames" is not working, if there are many files, then "find" with "-exec" comes in place.

Ответить
scopeguy
scopeguy - 26.06.2023 16:25

get bat and bat-extras for better cat, grep, less, diff, and some other options also :)

Ответить
side effect
side effect - 22.06.2023 23:47

Pipe grep into cat instead! ;-)

Ответить
Rishi Kaushik
Rishi Kaushik - 04.06.2023 00:38

before watching this i used to cat into less, i tried directly less <filename> and it works :)

Ответить
pafau k
pafau k - 24.05.2023 20:26

Firstly, don't tell me how to live my life 😂 And secundo, if there's supposed to be (imo there isn't) a 'right' and a 'wrong' way to do it, I'd say piping into grep has more advantages and closer to *nix ethos than just using grep.

Ответить
Apollo Apostolos
Apollo Apostolos - 21.04.2023 21:48

More more more more!!!!
I love this!!! These videos help so much!!

Ответить
Wouter Oosterveld
Wouter Oosterveld - 13.03.2023 12:55

Pfff

Ответить
edward mac nab
edward mac nab - 07.03.2023 01:50

RTFM

Ответить
Abhishek Choudhary
Abhishek Choudhary - 26.02.2023 20:10

why is he wearing sunglasses inside a room

Ответить
Mig Trewornan
Mig Trewornan - 21.02.2023 00:17

"< file" is a bashism so OK on the command line but you probably shouldn't be using it in a script.

Ответить
Linuxdirk
Linuxdirk - 01.02.2023 11:04

People who use cat | grep also use curl | sh.

Ответить
MyTech
MyTech - 31.01.2023 06:44

Never realized a redirect-input could be used dyslexic-like, I always treated it like an arrow: tohere < fromhere.
head and tail are where it's at for writing file content to stdout. At least if you ever scrollback.

Ответить
MyTech
MyTech - 31.01.2023 06:39

What I find strange is redirecting into cat.
cat < afile
Which, at least back when I was new to bash, seemed to be the standard teaching example for a redirect.

Ответить
Charles Martin
Charles Martin - 04.01.2023 21:02

I have been using Unix since 1978. I do everything from shell scripts to kernel programming in C and I often start something with cat. So be a good puppy.

Ответить
AngeredKabar
AngeredKabar - 19.09.2022 06:21

I'm guilty of this lol

Ответить
mohamed fouad
mohamed fouad - 29.08.2022 11:59

do linguistic phd students study theory of computation ?

Ответить