<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="mailto:jbest@insightbb.com">jbest@insightbb.com</a> wrote:
<blockquote cite="mid:fcaeabf114ff3.4732f9bc@insightbb.com" type="cite">
  <pre wrap="">
----- Original Message -----
From: <a class="moz-txt-link-abbreviated" href="mailto:aragonx@dcsnow.com">aragonx@dcsnow.com</a>
Date: Thursday, November 8, 2007 11:45
Subject: stupid bash tricks (how to loop on the command line)
To: <a class="moz-txt-link-abbreviated" href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a>

  </pre>
  <blockquote type="cite">
    <pre wrap="">Okay, I saw a neat trick at work the other day.  A coworker 
somehow got
the shell to do looping without creating a file.  I believe 
he was using
csh to do so and I was wondering if I could do the same thing in 
bash. 
Basically I would like to be able to do a while loop to execute 
a df
command.

Any ideas?


    </pre>
  </blockquote>
  <pre wrap=""><!---->
almost any shell command sequence can be executed on the command line... consider the following..
while true; do df; sleep 3; done;

just a matter of separating the command elements with ;'s 
  </pre>
  <blockquote type="cite">
    <pre wrap="">-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
fedora-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a>
To unsubscribe: <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a>

    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
Actually, if you just want to loop some command, you can use the
command watch as well.<br>
Like so:<br>
<br>
watch -n3 df<br>
<br>
Saves writing/typing bash-scripts :)<br>
</body>
</html>