@Inwarwetrustful: Some man pages are better then other. I personally think they should all have at lest one example in the man page. But, mostly I use Google.
@boliussa: Yup, these earlier video were recorded on my EEEPC 900 and the mic sucks. The were just made for a friend and I didn't expect many others to video it, so Quality wasn't to important. Who knew it was going to over 25,000 views. I certainly didn't.
How do I return distinct lines? I'm using grep on a file and it finds results in more than one line so it returns duplicates. How do I tell it to only return a line once using grep or some other command?
@metalx1000: IT WORKS!!! Thx so much! I'm sitting with another small problem. When I use "lunx --dump url" it returns the results with line numbers to the left of it. How do I exclude this from the results?
@MannyQi: I assume you are referring to the numbered links. Lynx shouldn't number every line, just links with in the page. Lynx may have an option to remove the links and their numbering, but I don't know off the top of my head.
I still use Lynx often, but I think it's outdated. "Links" and "Links2" are pretty much the same things, but more up to date.
I believe you can accomplish what you are trying to do with them.
@metalx1000: I'm using curl to download some images, but I want to save these images with another name without having to specify the file extension. Do you know of any way this can be done? I've checked the curl man pages and googled it, but the only thing I found was "curl url -o newfilename.jpg". But the problem with this is that I have to specify the extension of the file and since they won't always be the same it won't really work for me...
@MannyQi: There are a few different ways I can answer this depending on the situation. If you are downloading multiple files, how are you finding these files? Do you have a list of links in a text file? Are you just pulling all the images from a page/site? Please give me a little more info so I can give you a better answer.
@urbanminimalist: -d is the switch for that stands for "delimiter". the \ indicates that the delimiter is a special character and the , is the delimiter.
@metalx1000 I made a text file so I could follow along on the lesson and thought others might benefit if I made it available. I guess i should have stated that along with the text. Sorry about that.
@darklordmelkor: although there is most likely a better way I would just pip it into another cut. So, if you do the first part and the output is pid/process just pipe it into another cut and cut at /
I hope this make sense. It's hard to explain in this little comment box.
If it doesn't make sense, let me know and I'll try and explain it better.
@metalx1000 thx for your answer i got help from my professor ^^ i did it with double awk (2nd one had field separator something like awk BEGIN { FS = "/"} {print $1} i dont remember exactly :O nice vids btw
@metalx1000 did it with double awk pipe with field separator in second one..thx for your reply anyway :) (deadline for the script was yesterday so i had to search more on my own..)
using a simple sound editor like the free Audacity you could have removed the terrible background hum in the video
poojkhgf 1 month ago
@poojkhgf: Yeah, but I didn't :P
metalx1000 1 month ago
@Inwarwetrustful: Some man pages are better then other. I personally think they should all have at lest one example in the man page. But, mostly I use Google.
metalx1000 1 month ago
There is a horrible background noise in this video. Maybe your laptop
boliussa 3 months ago
@boliussa: Yup, these earlier video were recorded on my EEEPC 900 and the mic sucks. The were just made for a friend and I didn't expect many others to video it, so Quality wasn't to important. Who knew it was going to over 25,000 views. I certainly didn't.
metalx1000 3 months ago
Very well explained, good job.
castelinop 4 months ago
How do I return distinct lines? I'm using grep on a file and it finds results in more than one line so it returns duplicates. How do I tell it to only return a line once using grep or some other command?
MannyQi 4 months ago
@MannyQi: try this:
grep wordtosearch4 file.txt |sort -u
metalx1000 4 months ago
@metalx1000: IT WORKS!!! Thx so much! I'm sitting with another small problem. When I use "lunx --dump url" it returns the results with line numbers to the left of it. How do I exclude this from the results?
MannyQi 4 months ago
@MannyQi: I assume you are referring to the numbered links. Lynx shouldn't number every line, just links with in the page. Lynx may have an option to remove the links and their numbering, but I don't know off the top of my head.
I still use Lynx often, but I think it's outdated. "Links" and "Links2" are pretty much the same things, but more up to date.
I believe you can accomplish what you are trying to do with them.
links2 -dump "websiteURL"
metalx1000 4 months ago
@metalx1000 I'm not familiar with links, but will look into it. Thank you.
MannyQi 4 months ago
@metalx1000: I'm using curl to download some images, but I want to save these images with another name without having to specify the file extension. Do you know of any way this can be done? I've checked the curl man pages and googled it, but the only thing I found was "curl url -o newfilename.jpg". But the problem with this is that I have to specify the extension of the file and since they won't always be the same it won't really work for me...
MannyQi 4 months ago
@MannyQi: There are a few different ways I can answer this depending on the situation. If you are downloading multiple files, how are you finding these files? Do you have a list of links in a text file? Are you just pulling all the images from a page/site? Please give me a little more info so I can give you a better answer.
metalx1000 4 months ago
@metalx1000: I've got a txt file which got generated from a db. So the file looks something like this:
...
2.jpg
3.jpg
...
MannyQi 4 months ago
thank you so much for this fantastic tutorial!
revolution77N 5 months ago
How can you use a pipe with out first explaining what it is?
Besides that, great tutorials.
holypupppet 7 months ago
@holypupppet: Do explain it. 2:27
It's going to take the output of the grep command (and I show what that is) and it puts it into the cut command.
metalx1000 7 months ago 3
what is the slash for on -d\, ? thanks! great vid!
urbanminimalist 7 months ago
@urbanminimalist nvm experimented a bit, looks like you need to escape it from being a command on its own
urbanminimalist 7 months ago
@urbanminimalist: -d is the switch for that stands for "delimiter". the \ indicates that the delimiter is a special character and the , is the delimiter.
metalx1000 7 months ago
kris, firefighter, east naples
jose, firefighter, east naples
john, driver, east naples
Matt, lieutenant, east naples
Frank, firefighter, north naples
Tom, lieutenant, north naples
Bob, driver, New york
john, firefighter, New york
helium73 9 months ago 4
@helium73 ???
metalx1000 9 months ago
@metalx1000 I made a text file so I could follow along on the lesson and thought others might benefit if I made it available. I guess i should have stated that along with the text. Sorry about that.
helium73 9 months ago
@helium73: Oh :) I was looking at it for some thing different then what I had. Like maybe it was a joke. Good call. Thanks.
metalx1000 9 months ago 2
what theme do you use? i like black-green terminal :D
doomi96 1 year ago
@doomi96: In Gnome-terminal "Edit>Profile Preferences" "Colors Tab" "Green on black"
metalx1000 1 year ago
Comment removed
helium73 9 months ago
Thx a lot.Well explained.Can´t wait for more :)
pheaneasphreak77 1 year ago
@pheaneasphreak77: I've got hundreds of videos. Feel Free to watch them all :)
metalx1000 1 year ago
nice ...its very clear
kirankrishna477 1 year ago
Very informative. Thanks for this tutorial!
Tj4den 1 year ago
@Tj4den: Thanks for watching and commenting.
metalx1000 1 year ago
what if i want to cut in half a field? for instance : pid/process (i want to ouput only the pid)
darklordmelkor 1 year ago
@darklordmelkor: although there is most likely a better way I would just pip it into another cut. So, if you do the first part and the output is pid/process just pipe it into another cut and cut at /
I hope this make sense. It's hard to explain in this little comment box.
If it doesn't make sense, let me know and I'll try and explain it better.
metalx1000 1 year ago
@metalx1000 thx for your answer i got help from my professor ^^ i did it with double awk (2nd one had field separator something like awk BEGIN { FS = "/"} {print $1} i dont remember exactly :O nice vids btw
darklordmelkor 1 year ago
@metalx1000 did it with double awk pipe with field separator in second one..thx for your reply anyway :) (deadline for the script was yesterday so i had to search more on my own..)
darklordmelkor 1 year ago
@darklordmelkor
ps aux | grep process | awk '{print $2}'
Only prints the pid. :)
luddishh 1 year ago
this is a great tutorial
chillbrotha01 2 years ago
what is nano for again?
chillbrotha01 2 years ago
nano is just a text editor.
You can use any text editor (vi, vim, gedit, leafpad, kate, etc...)
metalx1000 2 years ago
I see. Im taking a Unix class and this will help me alot. I may have some new ideas now using the grep commands and cat.
chillbrotha01 2 years ago
Yeah, I just had another viewer, who is in a class, ask be about creating a simple csv database script to manage a bookstore.
Although I won't be doing his home work for him. I will do some videos on the subject to help him in the right direction.
So, keep watching. Maybe you'll find them useful too.
metalx1000 2 years ago
metalx1000 has the best and most informative command line Linux tutorials I have seen anywhere. So much info packed into one video clip... A+
yenomeerf 2 years ago
thnx a lot man..... keep goin ahead ........but watchout the detour :p
kiddin...
MrRomanticHeart 2 years ago
great lessons. thanks man :D
orelhai 2 years ago
thanks alottttttttttttttt
keep it up
ABDULLAH202020 2 years ago