Added: 2 years ago
From: metalx1000
Views: 61,022
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (107)

Sign In or Sign Up now to post a comment!
  • About two lines echo into one, after I thought I saw that I made a fast comment. The output makes more sense more readable I thought with the first two echos to one line. Then I tried to delete the comment but too late and after that I saw just two line echos. Weary eyes??! -thank you further for the -n : no new line tip.

  • Thanks much. You made the learning faster, terrific!

  • Interesting how you got the 2 echo lines to output as one line! How?

  • @rskret: At what point in the video did I make too echo lines output as one line?

    I don't think I did it in this video, but this is one way of doing it:

    echo -n "this is a test "

    echo "this is a nother test"

    The -n in the first line prevents echo from creating a new line. Just make sure you have an extra space in your first string to the to lines don't run together.

    Hope this helps.

  • where you download that program

  • @SuperRifet You should get Linux or Mac OS and then just use the terminal and a simple texteditor of choice(i recommend xemacs).

  • @SuperRifet: try "linuxmint(dot)com"

  • The Purpose of bash scripting is making up a list of commands so you don't have to type them at the terminal all the time

  • so I've never even Heard of bash till today and this morning is the first time I've ever touched linux. I can repeat all the things you did here and remember a few commands but what is the purpose of this?

  • @Charsept: Not sure what you mean by, "what is the purpose of this?".

    You mean, "What is the purpose of programming?"

  • @metalx1000 i guess i just didnt recognize this as programming. the kind of programming im used to is a java IDE with a compile button, run button, etc. looks like my professor has some teaching to do.

  • @Charsept: Oh, well I have over 300 video tutorial on BASH, feel free to check them out.

  • @Charsept well, bash is a -Scripting- language, meaning that it does not needs to generate binaries, so no need to compile and run. it just interprets the script as is, sometimes with the help of other programs (echo, as example). Maybe metalx1000 can explain better.

  • Your tutorials are seriously better than the Linux script classes at my community college were. Thanks for posting them.

  • tried echo "mplayer -fs -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g --cookies /tmp/cookie.txt (link in here ) > youtubestream.txt , but it didnt work. What should i have done please

  • @MrWaynemarshall: Depends, what are you trying to do? I really can't tell from what you have posted. 

  • @metalx1000 i,m trying to save it into a text file so i can open it in the terminal

  • @MrWaynemarshall: you are trying to say the video to a text file? as in you want to watch it in ASCII format?

  • Did anyone else feel like changing welcome... to: wake up neo... cause I did lol

  • Thanks for posting. This is a nice intro.

  • @metalx1000 This might be something obvious but I just want to make sure; If I learn bash scripting will these scripts work with zsh? just by changing the #!/usr/bin/bash to zsh? or writing sh would work on both?... Thanks for the video.

  • @ttasutsu: Changing the SheBang (the first line of the script) is telling the OS what shell to use for this script. So, yes changing that line would make the computer use zsh instead of BASH, but if there is something in the script that works different in ZSH then it would in BASH, you might run into problems. Changing it to "sh" would cause it to use the sh shell.

  • Cool how this works on macs :D Faved, this video is fantastic.

  • Very helpful and well explained, thanks for these tutorials!

  • could you help me to make calendar with:

    Subject,"Start Date","Start Time","End Date","End Time","All day event","Reminder on/off","Reminder Date","Reminder Time","Categories","Descriptio­n","Location","Private"

  • @kalamonsy: First Question, is this Home work? Second, have you at lest started a script that you can share? People in the IRC Channel on my site maybe able to help.

  • @traveldoode369: You won't find a "tmp.sh" file. The "tmp.sh" is what you learned to make in this video. you can call it what ever you want when you make it.

  • Why do we need to start the script with: " #!/bin/bash "  ?

    I can't seem to remember having written that before in any of my earlier scripts. Although said scripts were quite simple. Thanks in advance.

  • @zlass55: When using a Unix or Unix like OS (Linux, BSD, Mac) the first line of a script is known as the "shebang". It tells the OS what type of script it is and what interpreter to use. In this case it's a BASH script. A few other options are #!/usr/bin/python for python scripts or #!/usr/bin/perl for perl scripts.

    There are also different shell environments. Examples are sh, tcsh, dash, ksh, ash.

  • thanks for the tutorials, i think you should re-do them though, the sound quality is not really good, anyway just a suggestion.. xD

    thanks again.

  • @martmelee: I know my first few videos the sound is real bad. They where originally just for a friend of mine and quality didn't matter to much. I've thought about redoing them and still may. But, I have so many things I have to make videos on. I have a list of over 40 videos to do, and every time I make a video I think of 3 more :)

  • Thank you, nice tutorial.

  • great video. 

  • wait....why do you have to put the quotes when echo-ing ?

  • @thecomputerist: You don't have too, it's just proper and a good habit to get into because there are cases where not having them will cause problems. Also, single quotes work different then double quotes.

    echo "test!!"

    is different then

    echo 'test!!'

    go ahead and give it a try

  • Ok, I'm starting all over again, and am going to learn from the bottom up. Im such a noob..... but with Metalx1000 Bash lessons.....like an advertisement. (inset comical "before and after" pictures here)

  • @metalx1000 hello!!! it was an awesome tutorial!! good job!!! may i ask how is it possible to run the script and then output the result in a one file eg out txt?

  • @markiptvlover: Sure, keep watching my BASH Playlist, and I go over stuff like that. But for now, to save the output to a file just redirect it with a >

    Here is an example:

    echo "hello world" > output.txt

    That will over write anything in that file.

    To add to a file use >>

    echo "hello world" >> output.txt

    If you want to see the output on the screen and save it to a file you can use "tee" if it's install on your system:

    echo "hello world"|tee output.txt

    

  • @metalx1000 actually i want for example all of the following commands to be output in a file out.txt

    echo "Hello my login name is" $LOGNAME

    echo "I belong in the group" $HOME

    echo "The operational system in the machine that i am connected is" $OSTYPE

    echo "The current directory that i am in is" $PWD

    echo "The list of directories to search for commands is" $PATH

  • @markiptvlover : Try this:

    #!/bin/bash

    cat >>output.txt<< EOF

    Hello my login name is $LOGNAME

    I belong in the group $HOME

    The operational system in the machine that i am connected is $OSTYPE

    The current directory that i am in is $PWD

    The list of directories to search for commands is $PATH

    EOF

  • @metalx1000 ok that worked!!! thank's!! may i ask something else? is there a way that the results are both appeared in the terminal and in the output file? I mean now i can see them only in the output file but not in the terminal. Any chance to see them both ways?

  • @markiptvlover: Yes, that is what "tee" does. I mentioned that in the first port. It may not be installed by default, but it should be in your package manager. Let me know if you can't figure it out and I'll give you more details.

  • @markiptvlover ok thank's!!! i finally made it!! Sorry but at first it seems that i haven't pay too much attention where it said "tee"....Thank's a LOT!!! YOU ARE AWESOME!!

  • Ok, 2 questions. How do I start Chrome from terminal? and I know how start Twinkle form terminal, but how do I see the lines of programming and list through it to examine it? I want to see my first code. I use a lot of SIP (like you haha) and want to see how it works. Then how do I delete it? I know how to sudo apt-get it. I still cant change directories by cd/ home. Thanks again for your vids, I am just now getting back into programming.

  • @analyzingfunny: I would think you just type "chrome", but if not you just need to find out what the program is called. Try typing "chrome" and hit tab a few times and see if what option come up.  Same with twinkle. remember that it is case sensitive and in most cases the program is going to be all lower case.

  • @analyzingfunny:I don't know much about Twinkle, so I don't know if it's a scripting language (Python, Perl) or if it's compiled (C, C++). If it's a compiled program, you'll have to get the source code. In the repositories the source code will, in most cases come in the development files. Look for something like "twinkle-dev" other wise check out the twinkle website. They should have a source code package there.

    it should be:

    cd /home

    not

    cd/ home

  • @s200784b stating the obvious does make you one too

  • @s200784b that was cool and very helpful. Thanks. I see how it gives all possible commands.

  • Thanks very much for this video.. it helps alot.. !! and @s200784b.. i like this video and i am not a noob.. i have just started bash scripting and never seen this before in my life.. so how am i supposed to start to learn it.. by jumping straight to advanced??? idiot

  • Awesome tutorial! You did an amazing job for beginners like me :)

  • @s200784b: Yup, when I start in Linux, I would say to myself, "To day I'm going through all the "A's". I would type "a" and hit [tab][tab] and start at the first command. Read the Man Page and maybe Google it. I would play with it some and then move on to the next command. The next day or when I finished the with "a" I would move on to "b"

  • @s200784b: Everyone has to start somewhere.

  • Thank you for this tutorial! 10/10 :D

  • Thanks dude, you are a true command line warrior!

  • Good tutorial. Thank you.

  • good video 

  • Great tutorial.

  • great video, I was looking for a tutorial like this. Thanks!

  • @MetalShreader: No Problem, Thanks for watching.

  • thanks alot. you are great metalx1000

  • Learning to use command line made me love linux even more <3

  • Great tut, thanks! 

  • thanks a lot

    very nice tutorial

  • excelent Tutorials

  • thank you so much. ive been really interested in shell and bash scripting and this is really helpful. im glad to see you have at least 5 of them im not sure if you have more yet. i already can make a really basic script but i didnt know about setting a variable to this was really helpful.

    oh and i did EXACTLY what you did so when i used ans for the variable it didnt work but then after the vid i tried changing it to blah (just random) and it worked. do you know why?

    well thanks again.

  • @mrbackhand1234: Thanks for watching. I actually have over a hundred tutorials up on writing shell scripts currently and I post a few new every week. I also have a lot of tutorial on other Open Source related stuff. Check out the links in the video description.

  • I want to be a hacker +-+ But first i need some help with this,

    I downloaded Backtrack4 (a version of linux with a lot of tools for sniffing, Cracking, xploiting and more)

    Thank you for the tutorial, really helpful +10

  • gd tutorial!

  • that's toooo easy

    why not show me how to make a bomb

  • Dude you said wrong about the sign.

    # = Hash Sign

    £ = Pound Sign

  • Interesting.

    From Wiki:

    In the United States, the symbol is usually called the pound sign, and the key bearing this symbol on touch-tone phones is called the pound key. .. In most English-speaking countries outside North America, the symbol is usually called the hash mark, hash sign, or hash symbol, and the corresponding telephone key is the hash key.

  • Hash or pound, I hear both used on a regular basis.

    I'm Canadian, so we still use British terms for many things, unlike the United States.

  • @metalx1000

    Could you recommend a good book for a beginner level bash script programming book ?

    Thanks

  • @vnck25: I've been asked this before. I haven't read any myself, so I can't recommend a good one. I learn better from Online tutorials. I Google what I want to learn and skim the tutorial. I have plenty of video tutorial at my site that may help.

  • @OlloX3 Well said I'm offended now :(

    I'm English!

    ...:(...

  • Comment removed

  • For some reason I have to keep moving the mouse for the video to proceed. If I don't move the mouse it just stops forever. But its a great tutorial for a newbie like me.

    Thanks.

  • @RabbiTzedakah Wow, a rabbi learning bash!! Awesome!!

  • nice!

  • very nice and crisp tutorial buddy.

    thanks a ton for uploading this

  • whered you get your linux?

  • In this video I am running Debian with icewm.

  • Distrowatch org is a good place to find different distributions of Linux and other Open-Source OS's.

  • grateful and helpful tutorial. thanks and I would like something to ask about remove user input as you showed above is only for input data. How to remove input data from remove option?

  • Thanks, great vid.

  • very good, thank you

  • all your videos are very helpfull and informative... :) thanks a lot.

  • How to upload videos fast on to youtube? is there any script tool which I can install and use on Vista?

  • I'll look into it. I'm sure it could be done with cURL. As far as Vista goes, I never touch the stuff, but I'm sure you can get cURL for Vista. And if you are being forced to use Vista you may want to look into something like cygwin.

  • the most incredible clear tutorial here, thank you very much.

    UR the man!

  • Great Tutorial! Very descriptive and easy to understand. Keep up the good work!

  • Great tutorial :)

  • thx man

  • Dude, that was a GREEEEEAAAATTTT Job, keep them coming!

  • go linux!

  • I want to thank u so much, u made this so much clearer than my prof. THANKKKKKKKKK U. Keep the good work.

  • metalx1000, thank you very much for putting this video up. It's much easier to learn this way than reading loads of pages before things get interesting.

    Many thanks!!! Wishing you all the best.

  • New to Unix/Linux thank you very much. This so much easier than reading a HOWTO!

  • thanks loads

  • thanks i am new to linux

  • very helpful, thanks for putting this. :D

  • cheers, very helpful keep them coming ^^

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more