이거슨 코딩인가 아닌가
```bash
#!/bin/bash
command_exists() {
command -v "$1" >/dev/null 2>&1
}
if command_exists gcc; then
:
else
if command_exists apt-get; then
sudo apt-get install -y gcc
elif command_exists dnf; then
sudo dnf install -y gcc
elif command_exists yum; then
sudo yum install -y gcc
elif command_exists pacman; then
sudo pacman -Syu --noconfirm gcc
elif command_exists zypper; then
sudo zypper install -y gcc
else
echo "???"
exit 1
fi
if ! command_exists gcc; then
echo "???"
exit 1
else
:
fi
fi
echo '
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}' | gcc -x c -
if [ ! -f a.out ]; then
exit 1
else
:
fi
./a.out
rm a.out
```
파일 덮어 씀 주의...
파일 삭제 주의...
패키지 설치 주의
ㅇ...아무튼 됐다...
0
3 comments
comi-soft
05/21/25 Edited 05/21/25C언어가 중간에 들어갔으니 C언어 코딩이라고 하시죠?
LTS
05/22/25 인정 감사합니다
elnamu
05/23/25 인터프린터의 소중함을 깨닫게 되는듯..
기타언어
파이썬이랑 GDScript 문법 어느정도로 비슷함?
asdasdvwefcd
07/28/25
1684
1
파이썬이랑 GDScript 문법 어느정도로 비슷함?
기타언어
asdasdvwefcd
07/28/25 1684 1
기타언어
kotlin hello world
comi-soft
06/09/25
2815
0
kotlin hello world
기타언어
comi-soft
06/09/25 2815 0
기타언어
F# Hello, World!
jyunni
06/05/25
2811
0
F# Hello, World!
기타언어
jyunni
06/05/25 2811 0
기타언어
이거슨 코딩인가 아닌가
LTS
05/21/25
3940
0
이거슨 코딩인가 아닌가
기타언어
LTS
05/21/25 3940 0
기타언어
shell도 언어야 언어
ubuntu
05/20/25
3963
0
shell도 언어야 언어
기타언어
ubuntu
05/20/25 3963 0
기타언어
HTML 언어는 탭이 없어요
kts
05/17/25
4905
0
HTML 언어는 탭이 없어요
기타언어
kts
05/17/25 4905 0
기타언어
일단 뭐라도 써보자
binary는 호남선
05/17/25
5151
3
일단 뭐라도 써보자
기타언어
binary는 호남선
05/17/25 5151 3
s/turtleneckers
• 1,620 subscribers프로그래밍 서브입니다. 잡담, 문제 해결, 코드 리뷰(공지 필독)
Created 05/17/2025, 14:30:39
Rules
- 1. 기본 방임주의(절대 귀찮아서 그런 것 맞음)
- 2. 누가봐도 밴 당할법한 글 올리면 자를꺼임
- 3. 카테고리 지켜주면 좋겠지만 안지키면 안타까운거고