DEV Community

Wahid Abduhakimov
Wahid Abduhakimov

Posted on

C++ uchun run komandasi

scripts papkasi yaratamiz

mkdir ~/scripts
Enter fullscreen mode Exit fullscreen mode

run.sh bash file yaratamiz

touch ~/scripts/run.sh
Enter fullscreen mode Exit fullscreen mode

run.sh fayl ichiga quyidagi _script_ni yozamiz

#!/bin/bash
clear && gcc $1 -o main && ./main
Enter fullscreen mode Exit fullscreen mode

run.sh faylga execution ruxsatini beramiz

chmod +x ~/scripts/run.sh
Enter fullscreen mode Exit fullscreen mode

scripts papkasini global $PATH ga doimiy qo'shamiz.

echo "export PATH=$PATH:~/scripts" >> ~/.bash_profile
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
shkuvandikov profile image
shkuvandikov •

O'zbek tilida ham kontent ko'paysa naqadar yaxshi)

Collapse
 
wahidustoz profile image
Wahid Abduhakimov •

Shunga bel bog’laganmiz