|
6 years ago 0 |
But Linux Use Shell file run Terminal commands.
Below example copy pates in Text Editor
#!/bin/bash
# My first script
echo "Hello World!"
read -p "$*"
1. See Below Text Editor "Plain Text" change to sh
2. and save Desktop file name is test.sh
3. Open Terminal goto desktop path
4. Type below command
chmod 755 test.sh
5. Close Terminal.
6. Double click test.sh
7. and Click Run in Terminal and you can see
Hello World!
Above Code Details
#!/bin/bash : Call bash directory
# My first script : Comment use '#'
echo : Output text
read -p "$*" : Press any key to continue...
chmod : Change Modify
755 : Allow executing file as program