By default lubuntu and ubuntu support for bash script, so basically we don't need to install anything, we just need to create the script and execute it.
For this tutorial we are going to create a hello world script, it's very simple program that anybody can make, alright let's get going.
Step by step how to create helloworld bash script on lubuntu:
- open command line/console and then run this command:
leafpad helloworld.sh
- inside leafpad write the helloworld program like this:
#!/bin/bash
echo "hello world"
echo "this is my first script"
chmod +x helloworld.sh
./helloworld.sh
Congratulation you have just create a bash script/program, very easy isn't it? note that you can create and edit bash script using any text editor not just leafpad.
But because leafpad is the default GUI text editor on lubuntu, so for this tutorial i show you using leafpad, but you can use other text editor if you want.
No comments:
Post a Comment