[K12OSN] Scripters...I need your help! *please?*

Les Bell lesbell at lesbell.com.au
Thu Nov 18 22:49:32 UTC 2004


Petre Scheie <petre at maltzen.net> wrote:

>>
Off the top of my head:

!#/bin/bash
for x in `ls /home`; do
<<

No need to use a backquoted ls; if /home only contains home directories -
and it should - then just say

!#/bin/bash
for x in * ; do

If there are files in /home, you could follow that up with

  if [ -d $x ] ; then
    .
    .
  fi

just to make sure you only process directories.

Best,

--- Les Bell, RHCE, CISSP
[http://www.lesbell.com.au]





More information about the K12OSN mailing list