Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU nano 2.5.3 File: skripta.sh
- #!/bin/bash -x
- x=$1
- y=$2
- for((i=0;$i<${#x};i=(($i + 1)))) ;do
- if [ ${x:$i:1}=="1" ] && [ ${y:$i:1}=="1" ] ;then
- izhod="$izhod"0
- elif [ ${x:$i:1}=="0" ] && [ ${y:$i:1}=="1" ] ;then
- izhod="$izhod"1
- elif [ ${x:$i:1}=="1" ] && [ ${y:$i:1}=="0" ] ;then
- izhod="$izhod"1
- elif [ ${x:$i:1}=="0" ] && [ ${y:$i:1}=="0" ] ;then
- izhod="$izhod"0
- done
- echo $izhod
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement