public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
* unusual uniq results
@ 2004-09-28 15:09 William Stanard
  2004-09-28 16:11 ` Stone
  0 siblings, 1 reply; 5+ messages in thread
From: William Stanard @ 2004-09-28 15:09 UTC (permalink / raw)
  To: linux-newbie

In doing a demo before a class (Linux Red-hat 2.4.18-14), I used the uniq
command on a file (dup_nums) that consisted of twelve lines, each line
containing a number, from one to 9. I repeated the numbers, 6, 8, and 9.
The std output showed the expected list of numbers, all duplicates
removed. At a student's suggestion, I ran uniq again, but this time
directed the output to the file itself....

uniq dup_num > dup_num

...and, lo and behold, the file dup_num was empty. I checked uniq --help,
info uniq, and man uniq, all to no avail. Shouldn't uniq have removed the
duplicate numbers and written one through 9 to the file?

Bill stanard




-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-29 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-28 15:09 unusual uniq results William Stanard
2004-09-28 16:11 ` Stone
2004-09-29 11:07   ` William Stanard
2004-09-29 12:44     ` Simon Valiquette
2004-09-29 14:53     ` Yapo Sebastien

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox