Best way to change a field ina file

Maxwell Maklin maklinm at cognos.UUCP
Fri Jun 14 02:21:47 AEST 1991


Sorry, just a novice.  I was wondering what is the preferred way
to edit a field within a file.  I suppose sed(1V) is the preferred
choice, but I want to take a file as stdin, change a field and have
the changed file be place on stdout.  For example, how would one
change "gcos-field" in the /etc/passwd file?

Thanks,

Max



More information about the Comp.unix.shell mailing list