# Creating a Root or Cling Executable file

**URL:** <https://root-forum.cern.ch/t/creating-a-root-or-cling-executable-file/57119>\
**Category:** ROOT\
**Tags:** root\
**Created:** [November 14, 2023, 7:09pm UTC](https://root-forum.cern.ch/t/creating-a-root-or-cling-executable-file/57119 "2023-11-14T19:09:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cw2636](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/a9adbd/32.png) [@cw2636](https://root-forum.cern.ch/u/cw2636)\
**Post date:** [November 14, 2023, 7:09pm UTC](https://root-forum.cern.ch/t/creating-a-root-or-cling-executable-file/57119/1 "2023-11-14T19:09:10Z")

</div>

I wanted to create an executable, that i can call in a bash script, with c++ code, which when i run the bash scripts will interprete the c++ code, how can i achieved that. The root or cling executable will contains other functionalities that will be common among all scripts that calls it. How can i achieved it  
Bash scripts will look like  
#! /usr/local/bin/test\_executable

int main ( int argc, char \*argv )  
{

```auto
cout << " SUCCESSFUL" << endl;

```

exit ( 0 );  
}

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [November 15, 2023, 9:22am UTC](https://root-forum.cern.ch/t/creating-a-root-or-cling-executable-file/57119/2 "2023-11-15T09:22:48Z")

</div>

Closed on November 15, 2023, 9:22am UTC

This is a duplicate of [Root or Cling and Bash scripting](https://root-forum.cern.ch/t/root-or-cling-and-bash-scripting/57118)
