Grep and Regex - BASH - Linux

  Рет қаралды 48,607

Kris Occhipinti

Kris Occhipinti

13 жыл бұрын

filmsbykris.com/wordpress/?p=54
Got Questions? visit FilmsByKris.com/forum
Chat with us and learn more FilmsByKris.com/irc

Пікірлер: 59
@JaduSaikia
@JaduSaikia 10 жыл бұрын
useful. I always enjoy your videos, good stuff Kris !
@no1sploit529
@no1sploit529 3 жыл бұрын
10 years ago video having lots of great information ❤
@america0014
@america0014 13 жыл бұрын
Another great video. I'm loving the bash ones alot. Especially with grep, which is really handy. Tac on the -iRH and it gets pretty sweet too, even though my theory might not be as correct as using the find command with the -exec grep command...but as you said, "There's a thousand ways to do one task in Linux". Thanks Kris for this video...I now can say I have learned something new today!
@pleabargain
@pleabargain 12 жыл бұрын
Regex is so powerful. Thanks for these videos!
@nasirali-fs3fk
@nasirali-fs3fk 7 жыл бұрын
thank you Kris. i learned alot. god bless you.
@DigitalMetal
@DigitalMetal 13 жыл бұрын
@crusivol: -r is to do a "recurse" search. If you want to search through files in sub directories.
@JEANLOIZIN
@JEANLOIZIN 7 жыл бұрын
cheers mate. keep up the good work.
@marcoadriancenturion9314
@marcoadriancenturion9314 3 жыл бұрын
very usefull, my grand grandma was occhipinti from argentina
@macky1660
@macky1660 5 ай бұрын
thank you grep [Kk]ris for the wonderful video, I had 0 knowledge on Regex and this actually gave knowledge on how to use regular expression thank you!
@DigitalMetal
@DigitalMetal 5 ай бұрын
Glad it was helpful!
@russelljenkinsfearn
@russelljenkinsfearn 13 жыл бұрын
Great tutorial, just what I need, thanks One question. There is another line that begins AND ends with kris. Why didn't it find it?
@tuxsbro
@tuxsbro 13 жыл бұрын
more regex would be great, thanks for the videos
@DigitalMetal
@DigitalMetal 12 жыл бұрын
because the ^ says this is the beginning of the line and the $ says this is the end. Meaning, that the content in between has to match the entire line.
@PranitKothari
@PranitKothari 12 жыл бұрын
Great video. I am new to Linux world, and quite afraid of command line. But your video says its possible for me too
@abbadkamel8839
@abbadkamel8839 4 жыл бұрын
thank you kris
@georgigeorgiev2219
@georgigeorgiev2219 9 жыл бұрын
Thank you. GOD bless you.
@amerikraine3401
@amerikraine3401 3 жыл бұрын
I'm obsessed with ADB, you made a good video that was helpful. Thanks a lot. Email me if you want to ever exchange knowledge
@vanomel
@vanomel 13 жыл бұрын
@John8pie you are absolutely right!
@danieljoldenkamp2170
@danieljoldenkamp2170 4 жыл бұрын
Do more please. Thank you.
@Tubular-Trev
@Tubular-Trev 5 жыл бұрын
Thanks! Good video
@linuxsport
@linuxsport 13 жыл бұрын
great video thanks
@crusivol
@crusivol 13 жыл бұрын
thx for the quick reply sir but i have another one please i know the man pages can be found in /usr/share/man/ . The files for the man pages pertaining to a program can be found in man1/ and are compressed using gzip how do i copy all the man pages that pertain to md5 to a new directory in ~.
@rzaaeeff
@rzaaeeff 9 жыл бұрын
Thank you, Kris!
@DigitalMetal
@DigitalMetal 9 жыл бұрын
No Problem. :)
@rzaaeeff
@rzaaeeff 9 жыл бұрын
Are you sysadmin, dear? :)
@DigitalMetal
@DigitalMetal 9 жыл бұрын
Heydər Rzayev No, I'm a Fire Fighter.
@rzaaeeff
@rzaaeeff 9 жыл бұрын
Kris Occhipinti, good luck to you with fire )))
@crusivol
@crusivol 13 жыл бұрын
@metalx1000 im at a lost right now. what is the use for the -r flag for grep
@haleyneil
@haleyneil 9 жыл бұрын
Love the video, very helpful. I am very new to grep and I am trying to display 5 character words from the dictionary with only one duplicate letter and then display the duplicate letter next to it and then display the other letters that we not duplicated next to that. So far i have grep "^[a-z][a-z][a-z][a-z][a-z]$" usr/share/dict/words. Not sure where to go from there though. Would you have any ideas to get me started?
@tracywebb8633
@tracywebb8633 7 жыл бұрын
Haley Benshaw
@shizyninjarocks
@shizyninjarocks 7 жыл бұрын
So useful!!! thx thx thx!
@NeoColossus1020
@NeoColossus1020 11 жыл бұрын
What if you have a a variable like such var1="$USER some other stuff" and another variable like such var2='/this/dir'. How could you make a 3rd variable that saves the output of your grep? var3=$(`grep -iq $var1 "${var2}"`) doesn't seem to work. I know the syntax is probably not right here, which is why I'm stuck.
@mehrdadpc
@mehrdadpc 8 жыл бұрын
That's Awesome , Like Linux!
@DigitalMetal
@DigitalMetal 13 жыл бұрын
@bamdadkhan: I don't know how to do it, but I know it can be done. I'll let you know if I come across anything.
@wnegenennegentig5919
@wnegenennegentig5919 7 жыл бұрын
thank you, this is what I want to know
@ankursharma1461
@ankursharma1461 3 жыл бұрын
where should I keep this word.txt file, which directory, I installed Ubuntu on windows from the store
@sagarkarale
@sagarkarale 9 жыл бұрын
hey thanks for the explaining grep in a nutshell. Just a quick question, how can i just parse/select a particular pattern from the entire file. For instance, what will I use to search and extract number "1000". Don't want the entire line that has 1000 in it but just the number 1000. Hope my question makes sense. Thanks again.
@DigitalMetal
@DigitalMetal 9 жыл бұрын
Sagar Karale I understand what you are asking, but I don't understand why you would want to do that. Are you trying to get a count of how many times "1000" shows up?
@sagarkarale
@sagarkarale 9 жыл бұрын
Kris Occhipinti Ya that's one use. So I use utilities like nmap/netstat/nslookup but it spits out more result that I need. For instance, you can do a "host facebook.com" on your mac... and need only the IP address (v4 either v6) I'd use a regex along with grep but then it filters the entire line and not just the IP address. Hope that helps.
@DigitalMetal
@DigitalMetal 9 жыл бұрын
Sagar Karale Awk might be a good option: ifconfig | awk '/inet addr/{print substr($2,6)}' You can use grep with some other tools: ifconfig |grep -A1 wlan0|tail -n1|cut -d\: -f2|awk '{print $1}' hope these help some
@sagarkarale
@sagarkarale 9 жыл бұрын
Kris Occhipinti ya. i know about other utilities.. was looking if grep has something similar. Thank you for response.
@RanaMuhammadWaqas
@RanaMuhammadWaqas 10 жыл бұрын
Hey thank you for nice tutorial I want to search words in the terminal output like the result of "ps aux | grep netbeans/or-any-app" and for example i just want to look at some string in that output what command i can use to do that ? Thank you in advance !
@DigitalMetal
@DigitalMetal 10 жыл бұрын
I'd be glad to help, but I'm not sure I understand the question. Could you re-phrase it? Also, try contacting us here: filmsbykris.com/irc.html
@gaBehcuoDsuoitneterP
@gaBehcuoDsuoitneterP 11 ай бұрын
RegEx playlist?
@gr33nman
@gr33nman 12 жыл бұрын
You had the line 'kris is kris'. Why didn't grep ^kris$ word.txt pick up this line?
@kevinquinnyo
@kevinquinnyo 13 жыл бұрын
awesome
@amstvm
@amstvm 12 жыл бұрын
Good!!!
@killerbee133b
@killerbee133b 12 жыл бұрын
Give a regular expression that would match any string that begins with A and ends with B. Matches would include: AxxxxB AB ABABABAB
@aldolunabueno2634
@aldolunabueno2634 Жыл бұрын
7:15 Great trick for erase empty lines: grep -v ^$ file
@DigitalMetal
@DigitalMetal 12 жыл бұрын
@philipkthompson: grep " foo" text.txt
@russelljenkinsfearn
@russelljenkinsfearn 13 жыл бұрын
@vanomel Thanks!
@vanomel
@vanomel 13 жыл бұрын
@russelljenkinsfearn because it search only for line with one word. If you want to find lines like you said you have to put in something like this grep ^kris*kris$
@garyjames2184
@garyjames2184 Жыл бұрын
Can I pull ssn with regex
@DigitalMetal
@DigitalMetal Жыл бұрын
yes
@JohnLiuFromHK
@JohnLiuFromHK 9 жыл бұрын
More plz,:) i am confused with ? And + :(
@eatemadfanaee5954
@eatemadfanaee5954 4 жыл бұрын
can't hear anything!
@samjonesi2658
@samjonesi2658 5 ай бұрын
a
BASH Variables with ${}   Why and When.avi
2:51
Kris Occhipinti
Рет қаралды 3,3 М.
Filtering .log files, with cat, grep, cut, sort, and uniq
15:36
Китайка и Пчелка 4 серия😂😆
00:19
KITAYKA
Рет қаралды 3,7 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 56 МЛН
Regular Expressions - Computerphile
17:19
Computerphile
Рет қаралды 239 М.
Learning Awk Is Essential For Linux Users
20:02
DistroTube
Рет қаралды 286 М.
Where GREP Came From - Computerphile
10:07
Computerphile
Рет қаралды 932 М.
Regular Expressions (Regex): All the Basics
21:39
Luke Smith
Рет қаралды 55 М.
Top 5 Grep Regex Mistakes Explained - Linux Command-Line
14:13
RobertElderSoftware
Рет қаралды 4,2 М.
you need to learn BASH Scripting RIGHT NOW!! // EP 1
12:14
NetworkChuck
Рет қаралды 963 М.
grep: A Practical Guide
13:55
Navek
Рет қаралды 69 М.
Linux for Programmers #10 - Grep Command & Regular Expressions
14:18
Intro to Regular Expressions - How to use Regex in C#
55:52
IAmTimCorey
Рет қаралды 37 М.
Муравьи и нарисованные линии 🤯
0:24
FATA MORGANA
Рет қаралды 1,4 МЛН
ЧАПИТОСИИИИК🐾🐾🐾
0:14
Chapitosiki
Рет қаралды 68 МЛН
Профессиональный Точильщик Ножей 😍
0:43
EpicShortsRussia
Рет қаралды 4,5 МЛН