xargs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Bryce C
Date:  
Subject: xargs
--=-ZATzWirByBIjTcnq1Aq7
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

What I would just do is=20
for i in `cat users`; do cp -a /etc/skel/.procmailrc /home/$i/; chown
$i:$i /home/$i/.procmailrc; done
Simple bash programming there. For every line (user) in the file, cp the
file to their home directory, and change the ownership to them (User:
user's name, Group: user's name). I don't see the need for xargs and
I've never understood it myself.
Good luck.

On Sun, 2004-01-04 at 16:42, Craig White wrote:
> I don't ever use the xargs command and unfortunately, my bash book
> doesn't really cover it and it's really tricky.
>=20
> What I want to do is to distribute some new files which I put into
> /etc/skel to existing users (all users for that matter)...
>=20
> so I tried...
> ls /home > users # so I can edit list
> cd /home
> cat users > xargs cp /etc/skel/.procmailrc=20
> ### didn't work
> cp /etc/skel/.procmailrc < xargs users
> cp: overwrite `users'?=20
> ### clearly didn't work
>=20
> I've tried a bunch of different things but none seem to be happening...
>=20
> man xargs is never gonna get through to this thick head
>=20
> Craig
>=20
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

--=20
Bryce C <>
CoBryce Communications

--=-ZATzWirByBIjTcnq1Aq7
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/+Kdl/wbq/C6yyPcRAj+nAKCFMJtrjDjeayhk6wFtSYTB/tlPbgCeI8Us
21UdGOrtveqAhfqhFHcPgzY=
=75Ye
-----END PGP SIGNATURE-----

--=-ZATzWirByBIjTcnq1Aq7--