Mailing List Archive


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

Re: [tlug] question about shell scripting



On Thu, 25 Jan 2007 17:13:19 +0900 (JST)
scott@example.com wrote:

>    #!/bin/bash
>    for x in `awk -F: '{ print $1 }' /etc/shadow`;
>    /usr/bin/crontab -l -u $x;
>    done
> 
> but that crashes as well.
You forgot the do keyword , otherwise this works for me (tm).

# for x in `awk -F: '{ print $1 }' /etc/shadow`; do crontab -l -u $x; done
no crontab for root
no crontab for daemon
no crontab for bin
no crontab for sys
no crontab for sync
no crontab for games

Attachment: signature.asc
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links