hi,

Code:
#!/bin/bash
for var in `find /home/ -type d | \
sed -e "s/\/home\///"`; do
echo $var
done
in this code to display
Code:
user1/public_html/XXXX/XXXX
user1/XXX/XXXX/XXXX/XXXX/XXXX
user2/XXXXXX/XXXX/XXXX/XXXX/XXXX
user2/XXXX/XXXX/XXXX/XXXX/XXXX
user2/XXX/XXXX/XXXX/XXXX
user3/XX/XXXX/XXXX/XXXX/XXXX
what code to display (use for loop)
Code:
user1
user2
user3