How to Use Chaining Translation in Unix -


I want to translate the word "abcd" to the upper "ABCD" using the tru command if the "ABCD" Example 1234 for example

I want to combine two translations together (using lower case in upper case, then upper case up to 1234) and piping the final output more.

I'm not able to chain the second part.

echo "abcd" | | Tr '[: lower:]' '[: upper:]' & gt; File 1

Here I'm not sure how to add another translation into a single command.

You can not do this in a single tr command; You can do this in a pipeline:

  "ABCD" echo. Tr '[: less:]' '[: upper:]' | Note that your  [: less:]  and  [: upper:]  notation will translate more than  abcd  to  aBCD  in comparison with. If you want to expand the mapping of the digits then map  A-I  to  1-9 , this is possible; What are the maps for  0 ?  

If you want to do this in a single command, you can write:

  echo "abcdABCD" | Tr 'abcdABCD' '12341234' or   

Or, a little abridged: $ echo 'abecedenarian-DIABOLICALISM' | Tr 'a-dA-D' '1-41-4' 12e3e4en1ri1n-4I12OLI31LISM $

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -