On Wed, 20 Nov 2002, Angus Leeming wrote: > I have been playing a little with the scripts we use to modify the code > output by fdesign. I have used "sort" to create a minimal list of the > functions called by the .C file: > > EXTERN_FUNCS=extern.tmp > sed -n 's/extern void \(.*\)/extern "C" void \1/p' ${HIN} > ${EXTERN_FUNCS} > > if [ -s ${EXTERN_FUNCS} ]; then > sort -u ${EXTERN_FUNCS} > tmp > mv -f tmp ${EXTERN_FUNCS} > fi > > My question: is "sort -u" standard, or should I pipe the results of "sort" to > "uniq"?
Every script I've seen pipes through uniq. BTW, why aren't you using sed to do the whole lot? Allan. (ARRae) P.S. I have to ask this today because I won't be in tomorrow... P.P.S. Which also means I should use one of these ;-)