Introduction to Creating Shell and C applet under Linux

Source: Internet
Author: User

1. Create a shell script file

Gedit hello_shell.sh # #创建文件

2.## #在文件内添加一下内容

#!/bin/bash

For ((i=0;i<10;i++));d o

echo "Hello Shell"

Done

Exit 0

3. Add executable permissions to a file

chmod 755 hello_shell.sh

4. Execute the Script

./hello_shell.sh

# # #创建一个C语言程序 "Hello World"

1.gedit HELLO_WORLD.C

2.# #添加一下内容

#include <stdio.h>

int main (void)

{

printf ("Hello world!\n");

return 0;

}

3. Use GCC to generate executables after saving

Gcc-o Hello_world HELLO_WORLD.C

GCC-generated binaries that have executable permissions by default and do not need to be modified

Introduction to Creating Shell and C applet under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.