echo -n "Enter the String:- "
read n1
echo $n1 | rev
LEN=`echo $n1 | wc -c`
LEN=`expr $LEN - 1`
echo $LEN
echo "Enter starting:- "
read st
echo "Enter how many character to be extracted:- "
read chrn
end=$(($st + $chrn -1))
nwstr=`echo $n1 | cut -b $st-$end`
echo $nwstr
No comments:
Post a Comment