Find the answer to your Linux question:
Results 1 to 3 of 3
I'm looking for an argument which will let me loop a command ( as in run it over and over again ) in a linux command line environment. I've been ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11

    Looping command

    I'm looking for an argument which will let me loop a command ( as in run it over and over again ) in a linux command line environment. I've been searching but I haven't had any luck.

    Basically I want to run netstat over and over again to make it like a pseudo real time network monitoring script.

    Thanks for your help in advance!

    - Kevin

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    while true; do echo "hallo"; done
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    11
    haha... well it didn't run as perfectly as I envisioned it, but your code worked perfectly. Thanks for your help!

    Now I just need to find a way to make it refresh the statistics in netstat but leave all the other information fixed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •