Attempting to "cat /dev/urandom" and deleting characters using "tr" randomly results in "write error Broken pipe"

Solution Verified - Updated -

Issue

  • /dev/urandom is parsed by a script for internal application needs, and returns the below error at times:
[root@server]~$ cat /dev/urandom | head -c 50 | tr -dc 'a-zA-Z0-9~!'
1AS!3miYjUQaSRuZwJVcat: write error: Broken pipe

Environment

  • Red Hat Enterprise Linux 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content