Getting started with a simple SHELL under MAC

Source: Internet
Author: User
Tags shebang

1. create file. sh file

In this example, the full name of the sh file is demo.sh, and the next step is to use the freely familiar editor editor command to

2. Write the. sh file
#!/bin/shEcho+----------------------------------------------------------+Echo+ A Tools forPost CSDN blogs and input the key as Fllow: +Echo+ Digg [Digg all Blogs] +Echo+ views [view all blogs] +Echo+ReadID [ReadOne blogs] +Echo+ exports [exports all blogs] +Echo+ publish filename [Publish blogs] +Echo+ publishes filename [bat Publish blogs] +Echo+ login account password [login CSDN] +Echo+----------------------------------------------------------+printf "Input your order which num is contained on above:"  Readorderphp do.php$order
3. Run SH file

Operating mode

./demo.sh

Just, here, may prompt no permission, then need to change the permissions of the file, command for

chmod777 run.sh

Getting started with a simple SHELL under MAC

Related Article

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.