BASH scripting lesson 8 using TRAP to control scripts

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ • 21

  • @benjaminshtark5977
    @benjaminshtark5977 6 років тому +1

    Hi,
    A question, what would you do if you start a program in a subprocess (background), like a java application via your script and you still need to have PID files to protect your startup script from launching multiple java background apps and delete that .pid file when java app exits?

  • @arifpatel8944
    @arifpatel8944 2 роки тому

    Hi Andrew, Great tutorial for trap, Since you have used many environmental variables and switches = flags within scripts with place holders, it is very hard to understand and in middle of flow we are getting lost... Please if you can make one separate video for BASH environmental variables and switches = flags to use within script. Very good tutorial but hard to follow after watching many times. Thanks.

  • @Starcom23
    @Starcom23 10 років тому

    Why behind trap statement you have EXIT in capital letters, while in loop exit is in small? is it always like that?

    • @theurbanpenguin
      @theurbanpenguin  10 років тому +1

      EXIT in the trap is a keyword as opposed to the command exit in lowercase.

  • @kevinh6655
    @kevinh6655 9 років тому

    Hello , why you use double parentheses or nest parentheses (( count < 10 )) and (( count ++ ))? is ( count < 10 ) wrong?

    • @theurbanpenguin
      @theurbanpenguin  9 років тому +1

      +Kevin H (( )) is for mathematical calculations in BASH and yes ( count < 10 ) does not run the test. If you did not want you use the double brackets then is would be [ $count -lt 10 ]

    • @kevinh6655
      @kevinh6655 9 років тому

      thank you :)

  • @muniu911
    @muniu911 10 років тому

    Cool! Learnt more and indeed understand a bit deeper on Linux OS

  • @mariusmurzea582
    @mariusmurzea582 9 років тому

    What key did you press to exit from bash code??

    • @samantrao1214
      @samantrao1214 9 років тому

      +MArius Murzea Can you be a bit more specific? may be I can help you.

  • @graybri
    @graybri 2 роки тому

    great stuff

  • @sanjay005
    @sanjay005 8 років тому

    Very nice explanation... Thank you !!!

    • @pedronikolas3840
      @pedronikolas3840 3 роки тому

      i know Im kind of off topic but do anyone know a good place to stream new movies online?

    • @lewisjudah990
      @lewisjudah990 3 роки тому

      @Pedro Nikolas I would suggest FlixZone. You can find it by googling =)

    • @maxwelljefferson2633
      @maxwelljefferson2633 3 роки тому

      @Lewis Judah Yup, have been watching on FlixZone for since march myself :D

    • @pedronikolas3840
      @pedronikolas3840 3 роки тому

      @Lewis Judah thank you, I signed up and it seems to work :) I appreciate it !

    • @lewisjudah990
      @lewisjudah990 3 роки тому

      @Pedro Nikolas happy to help =)

  • @marianoforti1737
    @marianoforti1737 5 років тому

    very cool!

  • @Starcom23
    @Starcom23 10 років тому

    thx

  • @KevinBReynolds
    @KevinBReynolds 5 років тому

    Wow! Way over my head. :(