how to create a bash script

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
houmingc

how to create a bash script

Post by houmingc »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
buteman
Level 4
Level 4
Posts: 331
Joined: Tue Nov 29, 2011 5:36 pm
Location: North Lincolnshire

Re: how to create a bash script

Post by buteman »

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

Post by AlanWalker »

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,
Locked

Return to “Scripts & Bash”