BASH Scripting in Linux Lesson 1 - create, execute and debug scripts

  Рет қаралды 112,730

theurbanpenguin

theurbanpenguin

Күн бұрын

Пікірлер: 49
@kevinthomas1489
@kevinthomas1489 10 жыл бұрын
Great introduction to bash Andrew.
@christophertucker557
@christophertucker557 10 жыл бұрын
The colors inside vim (or vi) are difficult to read. Change colors or at least disable the colors option.
@rainonmyface
@rainonmyface 6 жыл бұрын
I came here to say this - super great tutorial, it is a little difficult to see when it goes to blue on black.
@farahmohumad5355
@farahmohumad5355 3 жыл бұрын
nano is the best
@farahmohumad5355
@farahmohumad5355 3 жыл бұрын
i like it the way you explain if
@DoodahGurl
@DoodahGurl 11 жыл бұрын
Great video. Very informative! Thanks for uploading.
@drakejohnson3803
@drakejohnson3803 8 жыл бұрын
I don't know if you still look at these comments, but I had a few questions. First, is there a way to put if statements on one line? Second, why do you use "vi" instead of "nano" for text editing? I saw someone else use nano and a different person use vi. Is there somereason I should use vi over nano?
@theurbanpenguin
@theurbanpenguin 8 жыл бұрын
+Drake Johnson Sure: cd /etc ; ls This will first change to the /etc directory and then list it. There is no conditional logic here. In other words the 2nd command will always try to tun even if the first command fails cd /etc && ls Here the listing with ls only runs cif the first command succeds. So we know we are listing the /etc directory cd /test || mkdir test In this last example the second command only runs if the first command fails. In this case we create the directory if it does not already exist. All of these examples can include more than two commands. In the long run you can do more with vi or vim than you can with nano. Nano is great wheile you are learning but try vi as well
@drakejohnson3803
@drakejohnson3803 8 жыл бұрын
***** Thanks a lot. But by if statements on one line I meant could you do: if [[ $USER = "$USER"]] then echo "Your username for this computer is $USER." fi Instead of: if [[$USER = "$USER"]] then echo "Your username for this computer is $USER." fi
@TraceguyRune
@TraceguyRune 9 жыл бұрын
2:10 Thank you . Now I can get my scripts to execute without "bash"
@MlleJulliette
@MlleJulliette 5 жыл бұрын
Heyyyyyyyy, can you add CC (Closed Captions)? Thanks!
@Occel0t575
@Occel0t575 9 жыл бұрын
best shell scripting courses i've found on the entire youtube ! Can you please put them on a playlist so I can download them easily ?
@Occel0t575
@Occel0t575 9 жыл бұрын
jackmatt47 i'm dumb gonna create it myself :P
@Berghiker
@Berghiker 4 жыл бұрын
How do I make a new bash profile? Mine is not found on my mac.
@igotdembombs
@igotdembombs 10 жыл бұрын
9:47 "We're testing to see if Andrew does not equal Andrew, and of COURSE Andrew does not equal Andrew"
@neckbont
@neckbont 9 жыл бұрын
Thanks for the video very however where do you define what the variable USER is in the script?
@theurbanpenguin
@theurbanpenguin 9 жыл бұрын
The variable $USER is set during the login and is part of your environment. As such you so not need to set the USER variable
@TraceguyRune
@TraceguyRune 9 жыл бұрын
+kornsnap $USER is a constant and a global. It's defined by the system
@ScreenPrintR
@ScreenPrintR Жыл бұрын
Mr. The Urban Penquin, do you have an online site with courses? Thank you in advance. Oops, I found it. Sorry. Must have misspelled it before.
@m-stermoh803
@m-stermoh803 10 жыл бұрын
thanks for this video it's very informative
@devilsey3
@devilsey3 9 жыл бұрын
Well video,,good for basic concept :)
@add111ful
@add111ful 11 жыл бұрын
too gud nice explanation...
@CosminRusu154
@CosminRusu154 11 жыл бұрын
VERY NICE!!!
@joshoduyoye110
@joshoduyoye110 9 жыл бұрын
SO when you set USER to andrew... are assigning andrew to the user or are you using typing andrew when you execute it?
@jzantana
@jzantana 9 жыл бұрын
+Josh Oduyoye That's an environment variable that gets its value upon login.
@taurus151986
@taurus151986 9 жыл бұрын
hello! after making the file executable I try to go back in /home/myname and execute bash01.sh but it tells me "bash01.sh: command not found". can anybody help? thanks
@theurbanpenguin
@theurbanpenguin 9 жыл бұрын
Go to the diectory where the script is a.n run it with ./scriptname
@taurus151986
@taurus151986 9 жыл бұрын
+theurbanpenguin thanks a lot
@TraceguyRune
@TraceguyRune 9 жыл бұрын
+Albert Rama make sure its in one of the $PATH directories try this: mv bash01.sh $HOME/bin/
@paasaanepali8729
@paasaanepali8729 8 жыл бұрын
where did you get that if section from
@stablizershock
@stablizershock 8 жыл бұрын
I want to execute command in current folder without defining patch how to do it>?
@theurbanpenguin
@theurbanpenguin 8 жыл бұрын
+stablizershock ./ or bash
@stablizershock
@stablizershock 8 жыл бұрын
***** I made sh file named as "install.sh" and i use "sh install.sh to execute but I want my customers to just open the file and command run as intended so should I use "./install.sh" command?
@brianmcgrady2674
@brianmcgrady2674 9 жыл бұрын
when I echo $PATH I dont have a /home/bri/bin , any isea why?
@theurbanpenguin
@theurbanpenguin 9 жыл бұрын
+Brian Mcgrady you can add it to your path variable PATH="$PATH:$HOME/bin"
@changjoe01
@changjoe01 12 жыл бұрын
Thank you !
@DJReeRee
@DJReeRee 9 жыл бұрын
Relax, Kris. This is a learning environment for us all. Its not stupid about the comment i made as mary clo. I am at work and we have virtual box on our machines, we do technical support and you tube videos play extremely lower for us than that of windows. i was only commenting from my personal experience. No need to be insulting.
@theurbanpenguin
@theurbanpenguin 11 жыл бұрын
Nu, but speak a little. I have friends in Cluj and we visit at least every year
@RenegadeFury
@RenegadeFury 11 жыл бұрын
that's sorta annoying how it's not == compared to most languages when checking
@TraceguyRune
@TraceguyRune 9 жыл бұрын
+Barack Lasagna Actually, its about half and half. Half the languages out there don't require "=="
@koczewniknawsegda3656
@koczewniknawsegda3656 11 жыл бұрын
You are romanian?
@lthzm
@lthzm 5 жыл бұрын
On roblox?
@gregshubert9982
@gregshubert9982 10 жыл бұрын
~bin isn't in my $PATH
@Berghiker
@Berghiker 4 жыл бұрын
​ How do I make a new bash profile? Command not found on my mac.
@theurbanpenguin
@theurbanpenguin 11 жыл бұрын
Nu, but speak a little. I have friends in Cluj and we visit at least every year
BASH Scripting in Linux Lesson 10 Working with CSV files
12:03
theurbanpenguin
Рет қаралды 102 М.
Let's Write A Script! | How To Create BASH Scripts In Linux
49:45
Joe Collins (EzeeLinux)
Рет қаралды 25 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 14 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 28 МЛН
you need to learn BASH Scripting RIGHT NOW!! // EP 1
12:14
NetworkChuck
Рет қаралды 1 МЛН
Linux Directories Explained in 100 Seconds
2:53
Fireship
Рет қаралды 1,5 МЛН
Shell Scripting Crash Course - Beginner Level
32:19
Traversy Media
Рет қаралды 748 М.
Transform Your Scripts With Bash Simple Curses
16:15
DistroTube
Рет қаралды 111 М.
Write Your Own Bash Scripts for Automation [Tutorial]
16:35
Null Byte
Рет қаралды 774 М.
Creating Command Line Menus with Shell Scripts
14:09
theurbanpenguin
Рет қаралды 82 М.
Debugging Bash Scripts: The Power of set -e, set -x, set -o, and set -u
9:35
Bash Scripting Tutorial for Beginners
47:57
freeCodeCamp.org
Рет қаралды 543 М.
Become a bash scripting pro - full course
36:00
CODE IS EVERYTHING
Рет қаралды 69 М.
Master Linux Shell Scripting: Learn IF ELSE Statement
11:40
Infinite Linux
Рет қаралды 510
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 14 МЛН