Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] question about shell scripting



scott@example.com wrote:
 
  
>    #!/bin/bash
>    for x in `awk -F: '{ print $1 }' /etc/shadow`;
>    /usr/bin/crontab -l -u $x;
>    done

  I know nothin of crontab to say whether or not there's a
problem there. But ...

   for x in `awk -F: '{ print $1 }' /etc/shadow`; do
       .
       .
   done

     should "do" it, as far as getting the for loop to work.
   
      
  Incidentally, you can also "do" a "for x in `cut -d: -f1 /etc/shadow`; do "
instead of the awk line. I tend to use both...

    -Chris
 



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links