Bash problem

Nathan England plug-discuss@lists.plug.phoenix.az.us
Sun, 2 Feb 2003 03:22:52 -0700


=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Thanks kevin. That actually clicked in my head right after I hit send.=20
But thanks anyway.

nathan
Am Sonntag 02 Februar 2003 01:37 vormittags schrieb Kevin Brown:
> > I have a large text file with a bunch of names in it.
> >
> > Is there an easy way to have a script grep each name out of the file and
> > do something with it?
> >
> > Like create a variable from each name with the name as the value?
> > Or check to make sure that name is a folder somewhere else?
>
> something like:
>
> for p in `cat file`
> do
> echo $p
> done
>
> (add dir checking in place of echo $p).
>
> for p in `cat file`
> do
> if [ ! -e "$p" ]
> then
> 	`mkdir $p`
> else
> 	if [ ! -d "$p" ]
> 		echo "Not a Directory, but file by $p name exists here"
> 	fi
> fi
>
>
> Or something similar.
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change  you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

=2D --=20
Nathan England

Arcanum Linux !
nathan at the-arcanum.org
jabber id: linuxjunkie@jabber.earth.li

"A free society is one where it is safe to be unpopular."
=2D --Adlai Stevenson


Registered Linux User #189789, Machine #106603
www.sincerechoice.org

Spam related material will be forwarded to:
uce@ftc.gov
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+PPF8Q7yNnsYcupwRAvixAJ0fQze5lh0R59RxJoqS6ZO145Fq6QCgoAKj
bkWNm+TpGJTibKt5LwVU9Zs=3D
=3Dc3zl
=2D----END PGP SIGNATURE-----