Sponsored Content
Full Discussion: Prompt path display issue
Top Forums UNIX for Dummies Questions & Answers Prompt path display issue Post 302921666 by RavinderSingh13 on Sunday 19th of October 2014 08:05:23 AM
Old 10-19-2014
Hello aelhosiny,

As I doesn't have csh so I can't test commands, could you please check if following link can help you in same.

how to set PS1 in csh - HP Enterprise Business Community

Thanks,
R. Singh
 

10 More Discussions You Might Find Interesting

1. Solaris

no boot prompt display

just put blank harddisk in my ultra10. i see no display to show me the boot> prompt. i don't know what happened....?? Got a third party graphic card. Display was ok. Monitor seems to be ok. i used different one with same result. (1 Reply)
Discussion started by: S26+
1 Replies

2. UNIX for Dummies Questions & Answers

Path in prompt line?

Can anyone tell me what makes the current path appear in the prompt ? thx (4 Replies)
Discussion started by: Leitwolf
4 Replies

3. Solaris

Solaris 10 install doesn't display Network Connectivity prompt page

I have two Dell x86 machines on which I am attempting to install Solaris 10 from CD. I am not doing a Jumpstart install. This is my first experience in installing Solaris (or any other OS). I am following the instructions at How to Quickly Install the Solaris 10 1/06 OS The first machine... (3 Replies)
Discussion started by: sarahsi
3 Replies

4. Solaris

How to display hostname in command prompt

Anyone know How to configure solaris 8 to display hostname in command prompt , everytime when you open a terminal screen . (3 Replies)
Discussion started by: civic2005
3 Replies

5. Shell Programming and Scripting

How to change prompt color when changing path

Hi all, Can you tell me how to change the prompt color (only the path part) when I chnange directory with "cd"? I use the sequence below in ".bashrc" (Solaris 8) to change my prompt colors and I'd like to modify it to change the path color when I cange directory. PSC() { echo -ne "\"; }... (0 Replies)
Discussion started by: majormark
0 Replies

6. UNIX for Advanced & Expert Users

Help-prompt for path and take this as input in find command

HI , I am trying to wite a script that will prompt me saying " what is path that you want to find ?". once i specify the path, the script should put this path in the find command mentioned below and execute the script: find <path> -ctime +200 -type f -exec ls -l {} \; for example : ... (7 Replies)
Discussion started by: bsandeep_80
7 Replies

7. Shell Programming and Scripting

how to change unix cmd display prompt?

I am new to to unix and I want to make my own basic shell. What is the code I can use to change the unix cmd console display? For example my unix display prompt says MyCompterName~, I want it to say WhatEverMan~ (3 Replies)
Discussion started by: megaearth77
3 Replies

8. Shell Programming and Scripting

How to display current time in the prompt

Hello All, I would like to display the current time in prompt. I tried using following command: export PS1="$(date +%k:%M:%S) $ " but it gave me a fixed time in prompt whereas my objective is to get the current time everytime. $ export PS1="$(date +%k:%M:%S) $ " 17:42:42 $ 17:42:42 $... (32 Replies)
Discussion started by: manishdivs
32 Replies

9. UNIX for Dummies Questions & Answers

Display the absolute path...

I don't understand the question below..any can help me? thanks Display the absolute path of the executable used when a 'grep' command is entered on the command line: ---------- Post updated at 08:30 PM ---------- Previous update was at 08:29 PM ---------- absolute (2 Replies)
Discussion started by: wk9031
2 Replies

10. Shell Programming and Scripting

Bash function to suppress warning message for specific text and display prompt

In the below bash function multiple variants are input and stored in a variable $variant, and each is written to an out file at c:/Users/cmccabe/Desktop/Python27/out.txt stored on a separate line. # enter variant phox2b() { printf "\n\n" printf "What is the id of the patient getting... (0 Replies)
Discussion started by: cmccabe
0 Replies
Expect::Simple(3pm)					User Contributed Perl Documentation				       Expect::Simple(3pm)

NAME
Expect::Simple - wrapper around the Expect module SYNOPSIS
use Expect::Simple; my $obj = new Expect::Simple { Cmd => [ dmcoords => 'verbose=1', "infile=$infile"], Prompt => [ -re => 'dmcoords>:s+' ], DisconnectCmd => 'q', Verbose => 0, Debug => 0, Timeout => 100 }; $obj->send( $cmd ); print $obj->before; print $obj->after; print $obj->match_str, " "; print $obj->match_idx, " "; print $obj->error_expect; print $obj->error; $expect_object = $obj->expect_handle; DESCRIPTION
"Expect::Simple" is a wrapper around the "Expect" module which should suffice for simple applications. It hides most of the "Expect" machinery; the "Expect" object is available for tweaking if need be. Generally, one starts by creating an Expect::Simple object using new. This will start up the target program, and will wait until one of the specified prompts is output by the target. At that point the caller should send() commands to the program; the results are available via the before, after, match_str, and match_idx methods. Since Expect simulates a terminal, there will be extra " " characters at the end of each line in the result (on UNIX at least). This is easily fixed: ($res = $obj->before) =~ tr/ //d; @lines = split( " ", $res ); This is not done automatically. Exceptions will be thrown on error (match with "/Expect::Simple/"). Errors from Expect are available via the error_expect method. More human readable errors are available via the error method. The connection is automatically broken (by sending the specified disconnect command to the target) when the Expect::Simple object is destroyed. Methods new $obj = Expect::Simple->new( \%attr ); This creates a new object, starting up the program with which to communicate (using the Expect spawn method) and waiting for a prompt. The passed hash reference must contain at least the Prompt, DisconnectCmd, and Cmd elements. The available attributes are: Cmd Cmd => $command, Cmd => [ $command, $arg1, $arg2, ... ], The command to which to connect. The passed command may either be a scalar or an array. Prompt This specifies one or more prompts to scan for. For a single prompt, the value may be a scalar; for more, or for matching of regular expressions, it should be an array reference. For example, Prompt => 'prompt1> ', Prompt => [ 'prompt1> ', 'prompt2> ', -re => 'promptd+>s+' ] All prompts are taken literally, unless immediately preceded by a "-re" flag, in which case they are regular expressions. DisconnectCmd This is the command to be sent to the target program which will cause it to exit. RawPty If set, then underlying Expect object's pty mode is set to raw mode (see Expect::raw_pty()). Timeout The time in seconds to wait until giving up on the target program responding. This is used during program startup and when any commands are sent to the program. It defaults to 1000 seconds. Debug The value is passed to Expect via its debug method. Verbose This results in various messages printed to the STDERR stream. If greater than 3, it turns on Expect's logging to STDOUT (via the log_stdout Expect method. send $obj->send( $cmd ); $obj->send( @cmds ); Send one or more commands to the target. After each command is sent, it waits for a prompt from the target. Only the output resulting from the last command is available via the after, before, etc. methods. match_idx This returns a unary based index indicating which prompt (in the list of prompts specified via the "Prompt" attribute to the new method) was received after the last command was sent. It will be undef if none was returned. match_str This returns the prompt which was matched after the last command was sent. before This returns the string received before the prompt. If no prompt was seen, it returns all output accumulated. This is usually what the caller wants to parse. Note that the first line will (usually) be the command that was sent to the target, because of echoing. Check this out to be sure! after This returns the 'after' string. Please read the Expect docs for more enlightenment. error This returns a cleaned up, more humanly readable version of the errors from Expect. It'll be undef if there was no error. error_expect This returns the original Expect error. expect_handle This returns the Expect object, in case further tweaking is necessary. BUGS
If the command to be run does not exist (or not in the current execution path), it's quite possible that the new method will not throw an exception. It's up to the caller to make sure that the command will run! There's no known workaround for this. LICENSE
This software is released under the GNU General Public License. You may find a copy at http://www.fsf.org/copyleft/gpl.html AUTHOR
Diab Jerius (djerius@cpan.org) perl v5.12.4 2008-05-06 Expect::Simple(3pm)
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy