title: How to create a CLI program with "shell prompt"?
body: <p>I'm very new in programming. The following task looks very simple but I don't know how to do it. Appreciate if anyone can give me some guidance.</p>
  
  <p>I'm using Linux OS. I would like to create a CLI program and let the user run it in shell terminal. I plan to use Bash shell script to create this program, but C++ or Perl should be ok too. The CLI program will accept commands from the user, execute it, and then optionally show the result summary on the screen.</p>
  
  <p>When the CLI program is running, I would like to make it always shows a "shell prompt" at the left-hand side of the shell terminal, just like the Bash shell prompt. The prompt indicates that the CLI program is waiting for the user to type in a command and press the return key.</p>
  
  <pre><code>[AAA@Bash user]$ # This is Bash shell
  [AAA@Bash user]$./CliApp.sh
  CliApp &gt; # The CLI program is running, user can type in command here
  CliApp &gt; exit
  [AAA@Bash user]$ # Now the user has returned to the Bash shell
  </code></pre>
  
  <p>I think I know how to print something on the screen and get inputs from the users, but I found that it looks very unprofessional. I believe that there is a better way to create this kind of program.</p>
  
  <p>Can anyone give me some guidance how to create this kind of program? Appreciate if you can give me the links to any example program. Thanks.</p>