IN="$(mktemp --suffix .s)" OUT="$(mktemp)" TEMP="$(mktemo --suffix .o)" cat > "$IN" nasm -felf64 "$IN" -o "$TEMP" if [ -f $TEMP ]; then ld "$TEMP" -o "$OUT" fi if [ -f $OUT ]; then exec "$OUT" fi