• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

Tag: while

20 August 2020

Create A Infinite Loop in Shell Script

Written by Rahul
Question – How do I create an infinite loop in shell script on Unix/Linux operating system? An infinite loop is used for running a set of instruction with never ending repeat. In this we create a loop which runs endlessly and keep executing the instructions until force stopped externally. Bash Infinite While Loop In...
Read More about Create A Infinite Loop in Shell Script
08 January 2015

Working with WHILE Loop in Bash Shell Scripting

Written by Rahul
Similar to for loop, while loop is also entry restricted loop. It means condition is checked before executing while loop. Mostly it also can do all the works which for loop can do but in uses it has own benefit of use in programming. Syntax: while [ condition ] do // programme to execute...
Read More about Working with WHILE Loop in Bash Shell Scripting
27 November 2014

How to Create Infinite while Loop in Bash Script

Written by Rahul
Command: while true;do echo “Press CTRL+C to Exit”; done Example 1: Some times we are required to execute some commands or processes continuously until stop it forcefully or conditionally. The following example of while loop will run continuously until stopped forcefully using ctrl + c. while true do echo "Press CTRL+C to Exit" done...
Read More about How to Create Infinite while Loop in Bash Script
22 November 2014

Reading File Line by Line in Linux Shell Script

Written by Rahul
While Loop: while read line do echo $line done < /tmp/file.txt Note: “line” is a variable which contains a single line read from file. Example:- Some times we required to read file content line by line inside shell a script. For this example this script will read /etc/passwd file line by line and print...
Read More about Reading File Line by Line in Linux Shell Script

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy