Write Your Own Bash Scripts for Automation [Tutorial]

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ธ.ค. 2024

ความคิดเห็น • 458

  • @zephyrus7258
    @zephyrus7258 3 ปีที่แล้ว +903

    This is my kind of guy. His eyes tell me he's wasted no more than 3 hours sleeping since birth.

    • @djvincon
      @djvincon 3 ปีที่แล้ว +31

      Pissed my pants lol

    • @rikkertkuklinski4410
      @rikkertkuklinski4410 3 ปีที่แล้ว +16

      he's an EXPERT at what he does, and i like it.

    • @rikkertkuklinski4410
      @rikkertkuklinski4410 3 ปีที่แล้ว +2

      @Badger anti R? Which programming language is that?

    • @aminechei8509
      @aminechei8509 3 ปีที่แล้ว +1

      @@rikkertkuklinski4410 R is the language

    • @rikkertkuklinski4410
      @rikkertkuklinski4410 3 ปีที่แล้ว +8

      @@aminechei8509 just be carefull. Dont piss the guy off. He might hack you while you're taking a dump and staring into your phone ...

  • @jasonpitts8395
    @jasonpitts8395 3 ปีที่แล้ว +150

    Dude where have you been? I was about to call 911 and report you as missing. Glad you are back.

    • @KangJangkrik
      @KangJangkrik 3 ปีที่แล้ว +1

      Oh wow false alarm for 911
      Good luck at trials bro

    • @kingseekerbackup3085
      @kingseekerbackup3085 3 ปีที่แล้ว +3

      @@KangJangkrik It was a joke.

    • @KangJangkrik
      @KangJangkrik 3 ปีที่แล้ว

      @@kingseekerbackup3085 I know

    • @sprBEAST211
      @sprBEAST211 3 ปีที่แล้ว +2

      The grim reaper pulled him into a dimension between space and time, to see who would blink first in exchange for his soul. Cody clearly won 👏👏👏

    • @bitonic589
      @bitonic589 2 ปีที่แล้ว

      @@sprBEAST211 lmao

  • @kevin_delaney
    @kevin_delaney ปีที่แล้ว +4

    I shortened that alias and implemented it into all my servers immediately (in my home) because it is simple and brilliant. I know them anyway because they are static, but I love the simplicity of it.

  • @nickopop77
    @nickopop77 2 ปีที่แล้ว +27

    I’ve watched a lot of technical training videos with 20 years in the industry.
    You do a great job explaining things included with real live demos! Thank you for sharing what you do! Helping others learn too. 🙌🏼

  • @sebastiansimon7557
    @sebastiansimon7557 3 ปีที่แล้ว +133

    You didn’t need the `echo $(`…`)` at the end, you just needed to escape the `$` so it doesn’t get expanded in the string: `alias ipaddress="ifconfig | grep broadcast | awk '{print \$2}'"`.

    • @RajivBandaru
      @RajivBandaru 2 ปีที่แล้ว +5

      Thanks for this tip. It is more short and useful.

    • @DavidConnerCodeaholic
      @DavidConnerCodeaholic 7 หลายเดือนก่อน +1

      Phew I’m glad I’m not the only one that caught this. 😅😅

    • @DavidConnerCodeaholic
      @DavidConnerCodeaholic 7 หลายเดือนก่อน +1

      Fortunately for the civilized jq users among us, there is now “ip -json addr show | jq …”
      No more ifconfig (I guess? Honestly I never got the ip tools memo, so this has been very confusing for me)

    • @NaNa-cq8ck
      @NaNa-cq8ck 2 หลายเดือนก่อน

      I don't understand the concept of 'escaping'.. why did it work without escaping before aliasing?

  • @rodrigito78
    @rodrigito78 3 ปีที่แล้ว +7

    Nice bash intro.
    Half the battle when writing bash is knowing which command and arguments (flags) to pass to it;
    # hostname -I
    Returns the system primary IP address. Type hostname --help for details.
    Of course, I understand the exercise was to demonstrate pipping capabilities of bash. But the less pipping the faster your script will run.
    Also, this is much better than without the curly brackets.
    # echo "${STRING}"
    Excellent job.

  • @DavidLindes
    @DavidLindes 2 ปีที่แล้ว +1

    Thanks for sharing.
    A minor correction, re 2:17 - the .sh extension is not actually necessary.
    And just a note re 12:55, while some folks do call those "curly brackets", a less-confusing name for them would be "braces" -- { and } -- whereas "brackets" (or "square brackets") would be [ and ].

  • @RicondaRacing
    @RicondaRacing 3 ปีที่แล้ว +5

    Studying for my Linux+, this is gold

  • @1ukastesar
    @1ukastesar ปีที่แล้ว +11

    In the case of shebang, it's better to use `/usr/bin/env bash` instead of the exact shell location so it can be ram on different machines without changing a single line.

    • @princesa_lina
      @princesa_lina ปีที่แล้ว

      thank you :D

    • @zuberkariye2299
      @zuberkariye2299 ปีที่แล้ว +2

      thats neat and smart tip, if i was to write malware on my linux machine and wanted to transfer to a remote machine somewhere else that might be using different shell. It could in cases like that then

  • @karlostj4683
    @karlostj4683 11 หลายเดือนก่อน +1

    It's fascinating that Mr. Kinzie explains that you need a "Ubuntu or Kali Linux system, really any Linux system" and then proceeds to create and run bash scripts on a macOS machine without mentioning that macOS does bash as well.

    • @Wegottohustlehard
      @Wegottohustlehard 8 หลายเดือนก่อน

      hey,,can you plz tell what is he using to type that script..cause if iuse vscode i amd not the sam eoutput.thank you!

    • @karlostj4683
      @karlostj4683 8 หลายเดือนก่อน

      @@Wegottohustlehard VSCode is a better editor IMHO but may be more complicated and sometimes simpler is better. Not sure why you're having trouble getting VSCode to work with his examples. I did just try the first script he typed in using VSCode instead of nano, and it works just fine.

  • @user-hy2ry3if8h
    @user-hy2ry3if8h 3 ปีที่แล้ว +5

    Great video. Exactly what a bash nab (me) needs to start up, see how to make a basic one then build on it, then add more and more and bit of polish ... brilliant.

  • @AstroDenny
    @AstroDenny 3 ปีที่แล้ว +7

    Cool video- There is a lot of content like this on youtube but your style makes this easy to ingest for beginners. Couple if things though- You don't have to have .sh at the end of it and it you're going to run it with `bash ` you don't need the shebang either. Also, why did you have to fuzz the ifconfig command?
    I hope you continue this series- bash offers some much more advanced capabilities.

  • @mojo3318
    @mojo3318 2 ปีที่แล้ว +2

    My dad had me watch this video for a class I'm going to take. This looks interesting. I like coding.

  • @novikovPrinciple
    @novikovPrinciple 3 ปีที่แล้ว +25

    Intermediate Tip: Use "man bash" to learn the semantic differences of: "&" (ampersand), "&&" (double ampersand), "|" (bar), and ";" (semi-colon).
    Most of my aliased commands use these punctuations, with one being "firefox & discord &" and another being "git fetch ; git status ;".
    GL, HF

  • @AmbushEveryone
    @AmbushEveryone 2 ปีที่แล้ว +3

    just getting started with Linux Mint on a VM. This video just taught me so much. thank you :)

  • @jonyboi21
    @jonyboi21 3 ปีที่แล้ว +140

    This guy explains it better than my professor did last week

    • @cyberrock9018
      @cyberrock9018 3 ปีที่แล้ว

      Are you taking computer science? Or IT

    • @bachokiro2866
      @bachokiro2866 3 ปีที่แล้ว +6

      Lmaoo thx I will never go to university

    • @arghosinha1424
      @arghosinha1424 3 ปีที่แล้ว

      I feel thee!!

    • @Rahul-lg1nw
      @Rahul-lg1nw 3 ปีที่แล้ว

      Mine tooooo😅

    • @helloMoto-k2
      @helloMoto-k2 3 ปีที่แล้ว

      @@cyberrock9018 which are you in?

  • @Alex-uc3ye
    @Alex-uc3ye 3 ปีที่แล้ว +38

    Writing bash scripts has saved me thousands of hours over the years. Thank you for the video, this is incredibly useful.

    • @charlesmagno28
      @charlesmagno28 2 ปีที่แล้ว +4

      any real world sample you can share? thanks

    • @bald_agent_smith
      @bald_agent_smith 9 หลายเดือนก่อน +1

      @@charlesmagno28I got the same situation. For example - it really helps handle server apps, particularly deploy updates (or configs, patches), do system tasks

  • @ramgopalvarma5949
    @ramgopalvarma5949 3 ปีที่แล้ว +1

    Thank you for showing the error you ran into and the work arounds in the video.

  • @garcand
    @garcand 3 ปีที่แล้ว +6

    Just what I needed. I was literally just thinking about this! Thumbs up

    • @whitedaniel53
      @whitedaniel53 3 ปีที่แล้ว

      Same bro, thought the algorithms recent update was to read my mind xD

  • @jackfletch2001
    @jackfletch2001 2 ปีที่แล้ว +1

    Holy crap, I'm shocked I actually know almost all of this. I was genuinely nervous thinking I forgot a lot of this stuff.

  • @lollubrick
    @lollubrick 3 ปีที่แล้ว +1

    I was going to comment to bash you for using nano but then I realized that I started doing anything on the *nix command line using nano instead of vi so I can't really say stuff; but vi is the best thing to learn.

  • @Ben12312312
    @Ben12312312 3 ปีที่แล้ว +125

    “Oops this isn’t python” hahah

  • @albertsnow7111
    @albertsnow7111 2 ปีที่แล้ว

    hello . 0:40 It's get my attention that black blanket on the wall. The blanket surface is like the equipment on the voice lab to eliminate external sound effect. Am I right?

  • @chffguy
    @chffguy ปีที่แล้ว

    Been trying to execute a bash file forever! First resource that actually helped!

  • @AadilAnsari-ee3ds
    @AadilAnsari-ee3ds ปีที่แล้ว

    Amazing. Actually the advance commands was awesome

  • @GeneralBlorp
    @GeneralBlorp 3 ปีที่แล้ว +5

    Bash was my entry point into coding!
    I just wanted to save time on repetitive tasks and chill more while at work; upside was that I learned I could annoy my supervisor by being such a TryHard.

    • @pianochannel100
      @pianochannel100 3 ปีที่แล้ว +3

      See but now they'll just give you more work if you prove yourself to be so efficient.

    • @justinc4782
      @justinc4782 3 ปีที่แล้ว +2

      @@pianochannel100 yes if you ever make these kind of tweaks keep it to yourself and dont brag about it! :)

    • @derpoblizist9076
      @derpoblizist9076 2 ปีที่แล้ว

      @@justinc4782 it depends where you want to go, to have a cushiony job with few working hours, then just quietly do your part.
      If you want to be more successful and have a job that recognizes this effort, then ask for more work.

    • @wasssuuuppp
      @wasssuuuppp 2 ปีที่แล้ว

      Any book recommendations to learn it more advanced?

  • @oxycodin2253
    @oxycodin2253 2 ปีที่แล้ว +1

    I taught my self this exact thing for batch scripting, time to learn bash!

  • @The_Digital_Samurai
    @The_Digital_Samurai 3 ปีที่แล้ว +1

    Bash scripting in the new Windows Terminal is very useful.

  • @codygaudet8071
    @codygaudet8071 3 ปีที่แล้ว +32

    You guys are reading my mind! This is EXACTLY the video I was looking for. This video is gold. More like this.

    • @sachinmaurya3259
      @sachinmaurya3259 3 ปีที่แล้ว +5

      this is what i was gonna type in comment .....lol

    • @jpablosaavedrag
      @jpablosaavedrag 3 ปีที่แล้ว +4

      @@sachinmaurya3259 I was going to type this too haha

    • @jpablosaavedrag
      @jpablosaavedrag 3 ปีที่แล้ว +1

      @@dawidsadzak8137 sad u.u but great they made this video

    • @codygaudet8071
      @codygaudet8071 3 ปีที่แล้ว +1

      ​@@dawidsadzak8137Way to devalue for the video for others my guy. If you don't get excited about this, you're in the wrong place.

    • @jpablosaavedrag
      @jpablosaavedrag 3 ปีที่แล้ว +2

      @@dawidsadzak8137 True. I've seen a few. But it was a nice coincidence to watch this video today. I know how the world works, still, i think it's a great short video about things you can do with bash scripting.

  • @douglawson8937
    @douglawson8937 2 ปีที่แล้ว

    a bit confused @8:53 with "read name". If name isn't defined as a variable yet, how is it reading it as the only reference to "name" previously is in the string?

    • @michallasan3695
      @michallasan3695 2 ปีที่แล้ว

      In bash, all variables are string, no need to declare, the default value being empty.

  • @charbelalam2648
    @charbelalam2648 2 ปีที่แล้ว

    He stares the information into my soul.

  • @worldboy9684
    @worldboy9684 2 ปีที่แล้ว

    Nice trick using a subprocess in an alias! Thanks

  • @danlule1
    @danlule1 ปีที่แล้ว

    Thanks a lot, this is very well explained. It is the best explanation I have come across unlike many scripting/programming videos where the narrator often spends a lot of time even hours talking to themselves in vain because they are so badly explained.

  • @pianochannel100
    @pianochannel100 3 ปีที่แล้ว +3

    The no-blink guy is back!

  • @ggsap
    @ggsap 3 ปีที่แล้ว +3

    Actually to find out the shell you are currently using you need to execute which $SHELL since most of the time you want your current shell to interpret your script

  • @zexsen85
    @zexsen85 3 ปีที่แล้ว

    woooow, Vibrasphere - Sweet september music on the beging.... I am delighted... :)

  • @vk-chinni
    @vk-chinni 3 ปีที่แล้ว +1

    @Null Byte what that "Codes" book behind you?

  • @VulcanOnWheels
    @VulcanOnWheels ปีที่แล้ว

    4:56 How did you change that 2 into a 3?
    7:07 Why not just use "whoami" by itself?

  • @OmarImrharn
    @OmarImrharn ปีที่แล้ว

    I ENJOY your helpful interventions and your professional knowlege. TANK'S TOO MUCH.

  • @jpdominator
    @jpdominator 3 ปีที่แล้ว +4

    I wouldn’t recommend using aliases like that. Make them little scripts. Aliases are part of bash expansion. Using grep with your alias… womp womp. Gotta single tick it. Aliases for obscure references. Scripts for other stuff, not piped commands.

  • @sirprancealott2003
    @sirprancealott2003 2 ปีที่แล้ว

    Great work Mate. Keep Staring

  • @dogbyte7875
    @dogbyte7875 2 ปีที่แล้ว +1

    Hey Kody, Thank you for your time and for your video

  • @jeremymesloh1981
    @jeremymesloh1981 3 ปีที่แล้ว +22

    You could also do ifconfig | awk '/broadcast/ {print $2}' which would let awk grep and parse column.

    • @analactica
      @analactica 3 ปีที่แล้ว

      Yeah that's definitely WAAAAY ahead my level atm , i didn't understand a thing , hopefully within a year I would 🤣🤦🏻‍♂️

    • @rodrigito78
      @rodrigito78 3 ปีที่แล้ว +5

      # hostname -I (uppercase i)

    • @analactica
      @analactica 3 ปีที่แล้ว

      @Learn Linux im starting to get the idea actually , my issue is the way i learn , unlike most people i need the bigger picture first , then the break down , not the other way around , sooo ya lol

  • @druzod1496
    @druzod1496 3 ปีที่แล้ว +21

    I love your videos, can't thank you enough for what you do out here, and thanks for taking the time to "give us" this knowledge. Keep. Up the good work!

  • @Neodeejay0500
    @Neodeejay0500 3 ปีที่แล้ว +2

    thanks from France!! I can't wait for the next video about bash scripting ! :)

  • @christophmuller7779
    @christophmuller7779 2 ปีที่แล้ว

    If you are not an admin that works with bash scripting everyday, i would prefer to recommend to use python for automating scripting.
    You won't look up all of these exceptions of bash every 1-2 months and python is much more intuitive if you need programming control structures.
    Especially if you have to evaluate/manipulate/forwarding of argument lists from one process to another process.
    We have ran into this issues every half year in our company. Usually the scripts are simple at the beginning (where bash is completely fine),
    but they will grow and got more complex. In such condition we always regret it to not implement them directly in python.

    • @michallasan3695
      @michallasan3695 2 ปีที่แล้ว

      Python is slow, Chads use bash and c++. Chads can handle complexity. You can write bugs in Python, too.

  • @BRBTechTalk
    @BRBTechTalk 2 ปีที่แล้ว

    Thank God you did not use "Hello World". I have created scripts before and I understand them but this was helpful for other variables I have not used.

  • @lxtwin
    @lxtwin 2 ปีที่แล้ว +1

    To make a script portable say RHEL 6, 7, 8 and 9 you can use #!/usr/bin/env bash instead of #!/bin/bash

  • @pavithraprajwal3838
    @pavithraprajwal3838 3 ปีที่แล้ว

    Sir i want a program or software that when i enter 'enter' button on keyboard that automatically enter tab 2 times & enter 2 in monitor can u plz help mee

  • @vikramnanda2833
    @vikramnanda2833 ปีที่แล้ว

    Thanks for the video
    Please do make more videos for daily task automation

  • @benjamindreyer9884
    @benjamindreyer9884 3 ปีที่แล้ว +37

    Me thinking about something*
    One day later this dude who never blinks says: “hmm maybe i should make a video about that”

  • @surajmishra5661
    @surajmishra5661 3 ปีที่แล้ว +1

    Can you make a script for making post on social media as planed per user and on given time

  • @tamirmaidani
    @tamirmaidani 3 ปีที่แล้ว +1

    Amaizing ,i did this tutorial on termux(android) , works like magic! Thanx alot!

  • @cortisolblue2208
    @cortisolblue2208 2 ปีที่แล้ว

    Was the $2 in your final script grabbed from a premade bash script? confused where that came from.

  • @vDungeon
    @vDungeon 3 ปีที่แล้ว

    Use bash, sh, perl etc ONLY in cases when you don’t pass arguments to the script and there is no any “if” like statements instead of checks for a command return code.
    You will be happy and other people who will work with your code base - too.

    • @michallasan3695
      @michallasan3695 2 ปีที่แล้ว

      Using bash is good if you execute many system commands, or else your program will spend much time waiting for system.

  • @nickt423
    @nickt423 3 ปีที่แล้ว

    Can you have windows scheduler run a shell file as an admin? If so, how would you do that?

  • @pcampbell-edu8508
    @pcampbell-edu8508 3 ปีที่แล้ว +26

    Good habits put in a "header" with the date, your name and purpose of the script.
    Also keep upper case vars for env vars.
    ^^^ being kind to your future self

  • @nikolaimakarov3034
    @nikolaimakarov3034 3 ปีที่แล้ว +1

    Do the aliases get saved themselves ? If not where to save them so that I can use them after I restart my system ?

    • @mattbeta
      @mattbeta 3 ปีที่แล้ว +3

      Add them to your ~/.bashrc file

    • @nikolaimakarov3034
      @nikolaimakarov3034 3 ปีที่แล้ว +2

      @@mattbeta thanks mate ! 😎

    • @justinc4782
      @justinc4782 3 ปีที่แล้ว

      @@nikolaimakarov3034 good tip is to make an alias for editing your aliases
      so aliases command would open up your .bashrc file :)

  • @Zimbob2424
    @Zimbob2424 2 ปีที่แล้ว

    It doesn't stay or save to the system, another words I set it up to watch my cpu temps, " watch -n 2 sensors" which I run whenever my pc is on, so I wanted to type "tmp" it does work but when I open a new terminal it doesn't, so really what is the point, I understand that I'm just learning bash script, so this is a Question, not a sarcastic remark.
    What I really want to learn is how to have bash scripts run on start up, thanks for the video

  • @EdwardVarner
    @EdwardVarner 3 ปีที่แล้ว

    Why would I put a command (like whoami) into echo to get it to appear when I can just put whoami on a line in the script and it does the same thing?

  • @maurolimaok
    @maurolimaok 2 ปีที่แล้ว

    I've been searching for a tutorial to make my terminal look like this, old green monitor, for a long time.
    Do you have any tutorial for that?
    I'm a complete newbie here in Brazil, learning Linux and Terminal prior to learn coding itself.
    Thanks for the video.

  • @soupedenuit
    @soupedenuit 2 ปีที่แล้ว

    Great video, but I gotta ask: are you using a hammer to type?

  • @starkarabil9260
    @starkarabil9260 2 ปีที่แล้ว

    I think I have very primitive question but I couldn't find the answer until now. The question is I have files created via pipeline in gitlab. I can see them with git bash command like ls but when I click on that directory the files are not there. How can I make those files visible on browser in gitlab?

  • @skunkhead2007
    @skunkhead2007 3 ปีที่แล้ว

    like the lgos stickers on laptop,any chance you can show us how to getinto v bullitin forums with out wireshark and being logged in...or how to get Ip from same boards not for spamming ...... the forums have some high end elite deepstate players ones a NATO person.

  • @crwmike0
    @crwmike0 3 ปีที่แล้ว

    A .sh extension is not required for a shell script.

  • @ben9262
    @ben9262 ปีที่แล้ว

    do we have to edit with nano or is it cool to create the .sh files with vim?

  • @sushiltiwari274
    @sushiltiwari274 3 ปีที่แล้ว

    If I want to simulate enter key what will be command. In other words I just want to send enter key after some command automatically what could be command for this

  • @martin5368
    @martin5368 3 ปีที่แล้ว +1

    Whats the difference between vi and nano

  • @seratonyn
    @seratonyn 3 ปีที่แล้ว +2

    Nice~♡ dig the first ifconfig 🤣

  • @yusufmeer7929
    @yusufmeer7929 2 ปีที่แล้ว

    How can I open an application using a bash file ? like how can I open Multiple profiles of chromium using the bash file ??

  • @hendrickkone679
    @hendrickkone679 3 ปีที่แล้ว

    Hi , I am in SOUTH AFRICA and I want to purchase your Linux course. I am getting an error "State must be filled" . I've used google account to log in. Solution?

  • @thomastang2587
    @thomastang2587 2 ปีที่แล้ว

    People see the result of your ifconfig, what will be the consequence of it? As long as it does not contain any public ip information, those results mean nothing to anyone right?

  • @ashpakpinjari9214
    @ashpakpinjari9214 3 ปีที่แล้ว

    Please continue this bash series.

  • @moth5005
    @moth5005 3 ปีที่แล้ว

    sick video , the alias thing is really cool.

    • @gedeonducloitre-delavarenn8106
      @gedeonducloitre-delavarenn8106 3 ปีที่แล้ว

      From man bash: For almost every purpose, aliases are superseded by shell functions.
      So no, aliases are not cool (apart maybe for just one command, but it gets crazy when you want to put more than one command with quotes; and also they can't handle arguments). Functions are cool!

  • @ovokteb9671
    @ovokteb9671 8 หลายเดือนก่อน

    Really helpful video . Do you have any course on Udemy that I can purchase ?

  • @Sourpusscandy
    @Sourpusscandy 3 ปีที่แล้ว +3

    Here’s what I’d like,
    Press the on button, boots to the login in screen.
    Computer says: who’s there?
    I answer with my name,
    Booting finishes, logged in.

    • @justinc4782
      @justinc4782 3 ปีที่แล้ว +2

      boot it into a tty by configuring grub.
      make your terminal run your little program when it loads
      use espeak to say "whos there"
      use the read command to ask for your name and get input,
      if, else, string contains to check for proper input, then boot into your graphical interface

    • @Sourpusscandy
      @Sourpusscandy 3 ปีที่แล้ว

      @@justinc4782 OK cool thanks!

  • @HikikomoriDev
    @HikikomoriDev 3 ปีที่แล้ว +1

    A lot of power to the user. Very useful.

  • @MrGFYne1337357
    @MrGFYne1337357 3 ปีที่แล้ว +6

    alright, this is more like it. let's be real, a lot of n00bs need to be learning stuff like this and not be so concerned about being the next best h4x0r. Good job Null Byte. /usr/share/thumbs.up

  • @geoffreycallaghan9649
    @geoffreycallaghan9649 3 ปีที่แล้ว

    You can send and receive sms
    text messages in the bash Terminal with textgun

  • @diegoleon1144
    @diegoleon1144 3 ปีที่แล้ว +1

    This guy teach like a master.

  • @Anandhpt
    @Anandhpt 3 ปีที่แล้ว

    Last task was awesome..thnx man

  • @tommyselbe1999
    @tommyselbe1999 ปีที่แล้ว

    Remember: **Syntax is your wand**, and every bug is a riddle waiting to be solved. May your journey be filled with wonder and your code compile without tantrums.

  • @denemeuyesi1212
    @denemeuyesi1212 3 ปีที่แล้ว

    Can you do this in bash scripting? Like, in a web page, if there s link with title "abc", click on that. Is this possible?

    • @robdavis8556
      @robdavis8556 3 ปีที่แล้ว +1

      Do you actually need a "click"? Look at wget to download files and curl for hitting endpoints on web servers.

  • @RakibHasan-hs1me
    @RakibHasan-hs1me 3 ปีที่แล้ว

    Do you have an easy way to opening a chat room with self destruct system

  • @realitynowassigned
    @realitynowassigned 3 ปีที่แล้ว

    In termux i get line command errors with the brackets and no if/else results without them

  • @TraceursMonkey
    @TraceursMonkey 3 ปีที่แล้ว

    Do all the scripts you make using "alias" are stored in bin/bash ? Thank you very much for the video , it fit like a puzzle piece for me .

    • @jonathanverret6872
      @jonathanverret6872 3 ปีที่แล้ว +2

      If you use the alias command in a live terminal, the alias is stored for that session only. Once you exit the terminal, the alias is lost.
      To save and store your own aliases, you need to edit your bashrc file, which is a configuration file that stores the settings for your shell. There are two copies of this file, one in /etc/bashrc that holds system-wide configuration (any user on the system will inherit these configurations), and one in /home/$USER/.bashrc that affects your user profile only. In most cases, you will want to edit the version of the file in /home/$USER/bashrc.
      Open the file with nano or vim and add your alias command to the file. You could add your command pretty much anywhere, but it's probably easiest to just add it to the end of the file. Once you save the file, the alias command you added will execute every time you open a shell.
      You can also edit the .bashrc file to change environment variables such as your $PATH.

    • @TraceursMonkey
      @TraceursMonkey 3 ปีที่แล้ว

      @@jonathanverret6872 Thank you very much for taking your time to explain :D Haw an awsome weekend !

  • @debeeriz
    @debeeriz 3 ปีที่แล้ว

    l need a bashscript to connect to my vpn but l cant figure out how to input my sudo password, the number answers to the questions 0-13 or the enter key which l have to manually do in the terminal on mint to connect

    • @michallasan3695
      @michallasan3695 2 ปีที่แล้ว

      echo -n "Pass: "; read pass

    • @debeeriz
      @debeeriz 2 ปีที่แล้ว

      @@michallasan3695 thanks, surfshark now have a proper linux app, so no need to use the terminal now

  • @isaactippetts882
    @isaactippetts882 2 ปีที่แล้ว

    So for me the "ifconfig" doesn't seem to work. Can anyone explain why?

  • @av36mo
    @av36mo ปีที่แล้ว

    But how do you remove an alias you created?

  • @imagreatguy1250
    @imagreatguy1250 2 ปีที่แล้ว

    This is good stuff mate 🧠👍

  • @ArshaansEdits
    @ArshaansEdits 3 ปีที่แล้ว

    7:04 you could run ls

  • @D3M0320
    @D3M0320 3 ปีที่แล้ว

    Would you do a similar video but with powershell?

  • @krotizmultika
    @krotizmultika 3 ปีที่แล้ว +3

    "belive"... Great video, as always, though.

  • @BurningtunaDC
    @BurningtunaDC 3 ปีที่แล้ว

    "Kody"? Jackie is the punk. Thanks for shooting and sharing such a great tutorial.

  • @damnson2806
    @damnson2806 3 ปีที่แล้ว

    Hi! I have a question, I just bought a Raspberry pi 4 model B, I've already installed kali, and I wanted to know, how can I modify it so every time I turn it on, it boots with ssh enabled?

    • @damnson2806
      @damnson2806 3 ปีที่แล้ว

      @@mfg5042 thank you for your help!

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 3 ปีที่แล้ว +1

    14:00 The reason why that won’t work is because the “$2” gets substituted by the shell at the point of alias definition, instead of alias invocation as you want. Try this:
    alias ipaddress='ifconfig | grep broadcast | awk '\''{print $2}'\'
    or this:
    alias ipaddress="ifconfig | grep broadcast | awk '{print \$2}'"

    • @gedeonducloitre-delavarenn8106
      @gedeonducloitre-delavarenn8106 3 ปีที่แล้ว

      Or just don't use aliases: man bash explicitly mentions *For almost every purpose, aliases are superseded by shell functions.*

  • @chitownbob9714
    @chitownbob9714 2 ปีที่แล้ว

    "Paranoids...HOW DARE YOU!"
    I love that sticker!

  • @tomward3988
    @tomward3988 3 ปีที่แล้ว

    Really didn't like the fact the second example was not finished after you ran in to the error. I have copied everything after you corrected it with "fi" and still getting error "line 4 [Tom]: Command not found"

  • @danishnayeem176
    @danishnayeem176 2 ปีที่แล้ว

    That keyboard is a drumset!! Link to buy?

  • @sarundayo
    @sarundayo 3 ปีที่แล้ว

    Where do you get your stickers from? 🤔