Quantcast
Channel: Active questions tagged bash+awk - Ask Ubuntu
Viewing all articles
Browse latest Browse all 102

Change numbers to random letter in SED

$
0
0

Considering the following number: 145478

I want to replace these numbers with random letters from a to z.

My attempt so far: sed -r 's/[0-9]/[a-z]/g'

It does not change the pattern to another pattern but exactly whatever I typed in the second place.

The result I got is: [a-z][a-z][a-z][a-z][a-z][a-z]

How do I make it into an actual pattern? In other words, how do I turn these numbers into random letter?


Viewing all articles
Browse latest Browse all 102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>