-d, --delete
Delete characters in SET1, do not translate.
An option of trx.
Usage
trx -d STRING1 [STRING2]
trx --delete STRING1 [STRING2]Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-d | --delete | none | delete characters in SET1, do not translate |
Examples
Strip Windows carriage returns from a file
trx -d '\r' < dos.txt > unix.txtDelete every digit
echox 'r2d2 c3po' | trx -d '[:digit:]'Keep only the printable characters and newlines
trx -cd '[:print:]\n' < binary.logDelete digits and squeeze the spaces left behind
echox 'a 1 2 b' | trx -ds '[:digit:]' ' 'Help in the terminal
gnux help trx --delete