SED - Transformation of Characters----------->>>'y/abc/123/'

 
=========================================================================
Transformation of Characters----------->>>
=========================================================================
[prabhucloudxlab@cxln4 prabhu]$ cat > filegrep.txt
unix is great os. unix is opensource. unix is free os.
learn operating system.
unix linux which one you choose.
uNix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.
ThIs Is LInux 2000
ThIs Is WIndows 3000
ThIs Is MAC 4000
ThIs Is LInux 2000
ThIs Is WIndows 3000



[prabhucloudxlab@cxln4 ~]$ cat>hello.sh
#! /bin/bash
#To delete any blank records 

echo "enter filename to substitute using sed"
read fileName

echo "                        "
if [[ -f $fileName ]]
then
echo "                        "
sed 'y/abcfghijklmn/1234567890XY/' $fileName
echo "====================================="

    else
    echo "$fileName doesn't exist"
fi




[prabhucloudxlab@cxln4 ~]$ sh hello.sh
enter filename to substitute using sed
filegrep.txt


uY7x 7s 5re1t os. uY7x 7s opeYsour3e. uY7x 7s 4ree os.
0e1rY oper1t7Y5 systeX.
uY7x 07Yux w6736 oYe you 36oose.
uN7x 7s e1sy to 0e1rY.uY7x 7s 1 Xu0t7user os.Le1rY uY7x .uY7x 7s 1 power4u0.
T6Is Is LIYux 2000
T6Is Is WIYdows 3000
T6Is Is MAC 4000
T6Is Is LIYux 2000
T6Is Is WIYdows 3000
=====================================