RTLLTR Ecnoder

From NAT, 6 Years ago, written in Bash, viewed 815 times.
URL https://code.nat.moe/view/1bbe1ba6 Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. # Encode a str with LTR and RTL... Remove all RTL and LTR unicode to decode.
  4. # Nice for encode URL :D ecnoded url works for Safari
  5.  
  6. REV="<202e>"
  7. BACK="<202d>"
  8. STR="$*"
  9.  
  10. for encode in a A c C e E g G i I k K m M o O q Q s S v V x X z Z
  11. do
  12.         STR=$(echo $STR | sed -e "s/$encode/$encode$REV/g")
  13. done
  14.  
  15. for encode in b B d D f F h H j J l L n N p P r R t T u U w W y Y
  16. do
  17.         STR=$(echo $STR | sed -e "s/$encode/$encode$BACK/g")
  18. done
  19. echo "COPY THE WHOLE LINE"
  20. echo $STR

Replies to RTLLTR Ecnoder rss

Title Name Language When
Re: RTLLTR Ecnoder NAT bash 6 Years ago.

Reply to "RTLLTR Ecnoder"

Here you can reply to the paste above

captcha