[TriLUG] Basic bash shell scripting question

Chris Hedemark chrish at trilug.org
Thu May 29 09:29:28 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Thursday, May 29, 2003, at 09:40 AM, Ryan Leathers wrote:

> The lines below will do what I want, but how can I make
> this more elegant?  Can I accomplish this without creating deleting and
> renaming as seen below?
>
> whoami > name
> cat checked.txt name > checked.new
> rm checked.txt
> rm name
> mv checked.new checked.txt

whoami >> checked.txt

- --

Chris Hedemark
UNIX / Linux / BSD / Mac OS X / Windows consulting available.  No job 
too small!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.2 (Darwin)

iEYEARECAAYFAj7WCz0ACgkQYPuF4Zq9lvYCZgCaAhnHEF/dClz8rrR/s1abhBZR
ui4AoLXo+y4Kdt8FdpJ5zW6zoYkmyW87
=+fFb
-----END PGP SIGNATURE-----




More information about the TriLUG mailing list