Created
November 3, 2018 21:58
-
-
Save mateusza/659b1d824d85e1a60ae0ac00bbbe9e27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p z-return0 bez-return0 | |
cat > z-return0/prog.c <<EOF | |
#include <stdio.h> | |
int main(){ | |
https://www.wykop.pl/ | |
printf("Hello world\n"); | |
return 0; | |
} | |
EOF | |
cat z-return0/prog.c | grep -v "return 0" > bez-return0/prog.c | |
for a in bez-return0 z-return0 | |
do | |
cd $a | |
gcc --pedantic prog.c | |
gcc -S prog.c | |
cd .. | |
done | |
diff -y -W 80 *-return0/prog.c | |
md5sum *-return0/a.out | |
md5sum *-return0/prog.s | |
echo "Pozdrawiam." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment