how to create a bash script

Forum rules
Before you post please read how to get help
houmingc
Level 1
Level 1
Posts: 14
Joined: Fri Apr 25, 2014 3:20 pm

how to create a bash script

Postby houmingc » Mon May 19, 2014 1:44 am

I am new in linux mint.
how to create a bash script.
i adding cppunit, boost library, my ide cannot find this library although it is installed.

buteman
Level 3
Level 3
Posts: 118
Joined: Tue Nov 29, 2011 5:36 pm
Location: North Lincolnshire

Re: how to create a bash script

Postby buteman » Mon May 19, 2014 2:41 am

I don't know what cppunit or boost library are and don't know what ide you mean or need.
Open your favorite text editor.
type in the script you want.
Save it.
change the permissions
run it.
For example:
In your editor type in the following:

Code: Select all

#!/bin/bash
clear
echo
echo
echo
echo "Hello script writer"

Save it with any name you like - I chose bash1
in a terminal window go to the directory you saved the program in.
run the following command

Code: Select all

chmod +x bash1

now run the program

Code: Select all

./bash1

AlanWalker

Re: how to create a bash script

Postby AlanWalker » Mon May 19, 2014 3:10 am

houmingc wrote:I am new in linux mint.
how to create a bash script.
i adding cppunit, boost library, my ide cannot find this library although it is installed.

Hi,

I'm confused. What does cppunit (a Unit Testing Framework), and boost library (C++ libraries) have to do with creating a bash script?

Also, what Integrated Development Environment are you using, and what do you want to do with it?

Anyway, this tutorial may help you with how to create a bash script.

Regards,


Return to “Scripts & Bash”

Who is online

Users browsing this forum: No registered users and 1 guest