Shell Script Tutorial for Beginners - Part 5 || For Loop

Поділитися
Вставка
  • Опубліковано 5 вер 2024
  • #shellscript #linuxessentials #forloop #loops
    In this video, we're going to look at some more advanced concepts in shell scripting, like the for loop.
    If you're looking to learn more about shell scripting, then this is the video for you! In this series, we'll be looking at for loop in shell scripting. By the end of this series, you'll be able to master shell scripting on the Linux platform!
    the for loop in shell script has multiple syntax that can be used in different situations.
    Website Link: www.dextutor.com
    All the material along with PPT is available at : dextutor.com/c...
    Other Playlist on this channel:
    Linux Essential for Beginners: • Linux Tutorial For Beg...
    RHCSA Exam: • RHCSA Exam Full Course
    Operating System Lab: • Operating System Lab
    Operating System: • Operating System

КОМЕНТАРІ • 5

  • @nacirarmando8003
    @nacirarmando8003 Рік тому

    @DexTutor, why are we using -f option instead of -e to check the file existence?

    • @dextutor
      @dextutor  Рік тому

      -f returns true if the argument is a regular file

  • @soheil527
    @soheil527 Рік тому

    How can I print my name ten times using a for loop? can you please help me with coding

    • @dextutor
      @dextutor  Рік тому

      I guess you need to go through the video again. Your answer is there in the video

    • @soheil527
      @soheil527 Рік тому +2

      @@dextutor figured that out now gain by rewatching. it is the second example. i was able to get my name printed ten times but along with number list using ' for num in {1..10} do echo "Suhel $num" done' . now i used the C-loop as in the second second example and printd my name ten times without any prefix/suffix.