command to show the shell command prompt

Posted by LinuxPenseur on Super User See other posts from Super User or by LinuxPenseur
Published on 2011-01-05T09:06:42Z Indexed on 2011/01/05 16:56 UTC
Read the original article Hit count: 438

Filed under:
|

Hi,

Is there a shell command to display the command prompt.

I will explain what i want through the illustration below.

When i execute script.sh, i should get the following output

$sh script.sh
$                   /* command prompt and then print hi */
hi

My script.sh is like this

#! /bin/bash

<command to display the shell command prompt>
echo "hi"
exit 0

what should the code that has to go in the place of angle brackets to get an output like above?

Thanks

© Super User or respective owner

command to show the shell command prompt

Posted by LinuxPenseur on Server Fault See other posts from Server Fault or by LinuxPenseur
Published on 2011-01-05T09:06:42Z Indexed on 2011/01/05 9:55 UTC
Read the original article Hit count: 439

Hi,

Is there a shell command to display the command prompt.

I will explain what i want through the illustration below.

When i execute script.sh, i should get the following output

$sh script.sh
$                   /* command prompt and then print hi */
hi

My script.sh is like this

#! /bin/bash

<command to display the shell command prompt>
echo "hi"
exit 0

what should the code that has to go in the place of angle brackets to get an output like above?

Thanks

© Server Fault or respective owner

Related posts about unix

Related posts about shell