Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. GNU nano 2.5.3 File: skripta.sh
  2.  
  3. #!/bin/bash -x
  4. x=$1
  5. y=$2
  6. for((i=0;$i<${#x};i=(($i + 1)))) ;do
  7. if [ ${x:$i:1}=="1" ] && [ ${y:$i:1}=="1" ] ;then
  8. izhod="$izhod"0
  9. elif [ ${x:$i:1}=="0" ] && [ ${y:$i:1}=="1" ] ;then
  10. izhod="$izhod"1
  11. elif [ ${x:$i:1}=="1" ] && [ ${y:$i:1}=="0" ] ;then
  12. izhod="$izhod"1
  13. elif [ ${x:$i:1}=="0" ] && [ ${y:$i:1}=="0" ] ;then
  14. izhod="$izhod"0
  15. done
  16. echo $izhod
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement