Sponsored Content
Full Discussion: Changing the prompt in CSH
Top Forums Shell Programming and Scripting Changing the prompt in CSH Post 302857519 by Corona688 on Thursday 26th of September 2013 01:27:21 PM
Old 09-26-2013
Putting $CWD in backticks won't stop $CWD from evaluating before the prompt is ever shown. Try \$ if csh lets you do that
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

current directory as part of the csh prompt

I would like my csh prompt to behave like the linux csh prompt setting done by linux command (set prompt="%n@%m %c]$ ") how do I do that? What I'm trying to do is that I would like to see what directory I'm in by looking at the prompt. I've figured out that %n is like $user, and %m is like... (3 Replies)
Discussion started by: jamesloh
3 Replies

2. UNIX for Dummies Questions & Answers

Changing the prompt

Phew simple question, I want to display the my directory path in prompt. Did the following in .profile PS1=`pwd` export PS! Worked, but it always points to HOME directory. When i do a cd, it doesn't change. What am i missing. Thanks (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

3. UNIX for Dummies Questions & Answers

Changing Prompt in sh

I know no one has ever asked this before {not :D } but I am trying to set the prompt in the .profile under sh. I have tried everything I have seen on the web in regards to this, with no success. The OS is SCO Unixware 7.1.1, {not by my choice}. All the examples I see seem to be for ksh, which is... (1 Reply)
Discussion started by: jcc5169
1 Replies

4. Solaris

Changing prompt

I currently have this as my prompt when I log in (shell is sh): PS1="`hostname ` # " My question is how do I add the current directory to that prompt? Is there a way? Thanks. (5 Replies)
Discussion started by: kjbaumann
5 Replies

5. UNIX for Advanced & Expert Users

Changing the password prompt

Is there any way I can change the prompt which asks for the password on a UNIX system? e.g. When I login using Telnet instead of "Password" I should get "Correct Password". Thanks, Vineet (3 Replies)
Discussion started by: vineetd
3 Replies

6. Shell Programming and Scripting

tcsh/csh: set prompt in production to color red

Hi folks This is our prompt at the moment oracle@pinkipinki:/opt/oracle> grep 'set prompt' .cshrc set prompt = "$user@`uname -n`:$cwd> " We wish to have in production the same prompt, but red. Howto do that? I tried a lot a internet manuals, but it doesn't work. (1 Reply)
Discussion started by: slashdotweenie
1 Replies

7. Shell Programming and Scripting

Changing the shell prompt

Hi, I want to change the shell prompt, using the cd command. I have a shell prompt like this - p78-mfx(dgaw1078/9781)$ Now i do this - p78-mfx(dgaw1078/9781)$ cd log4j here the shell prompt should change like this - p78-mfx(dgaw1078/9781)log4j$ (6 Replies)
Discussion started by: arunkumarmc
6 Replies

8. Shell Programming and Scripting

Changing the file name to a different one using csh

I have a file name n10-z30-dsr65-ndelt1.00-varp0.08-16x12drw-csq-msf.ps and I want to remove the varp info tag to get n10-z30-dsr65-ndelt1.00-16x12drw-csq-msf.ps Trying to use tr, but when I tried replacing varp with ooo I am getting the results below: echo... (2 Replies)
Discussion started by: kristinu
2 Replies

9. UNIX for Dummies Questions & Answers

Problem in C shell (csh) prompt setting containing the '$' char

Hi, I am trying to customize the command prompt of the C shell as follows: set prompt=" " The above one works fine but when I try to add a '$' (dollar) symbol into the string as set prompt=" " I am getting the error as: Illegal variable name However, this one set prompt = "-- %T %n %~ --... (2 Replies)
Discussion started by: royalibrahim
2 Replies

10. Shell Programming and Scripting

Changing script from csh to bash

Hello Guys I have a script working fine on csh, but I would like to change it to bash, how I should change this command to be able to work as bash script. :wall: if ( $fsw > "0" ) then foreach swath ( `awk 'BEGIN {for (i='$fsw';i<='$lsw';i++) printf ("%s\n", i) }'` ) ## work to be done... (2 Replies)
Discussion started by: jiam912
2 Replies
Test::File::ShareDir(3pm)				User Contributed Perl Documentation				 Test::File::ShareDir(3pm)

NAME
Test::File::ShareDir - Create a Fake ShareDir for your modules for testing. VERSION
version 0.3.1 SYNOPSIS
use Test::More; # use FindBin; optional use Test::File::ShareDir # -root => "$FindBin::Bin/../" # optional, -share => { -module => { 'My::Module' => 'share/MyModule' } -dist => { 'My-Dist' => 'share/somefolder' } }; use My::Module; use File::ShareDir qw( module_dir dist_dir ); module_dir( 'My::Module' ) # dir with files from $dist/share/MyModule dist_dir( 'My-Dist' ) # dir with files from $dist/share/somefolder DESCRIPTION
This module only has support for creating 'new' style share dirs and are NOT compatible with old File::ShareDirs. For this reason, unless you have File::ShareDir 1.00 or later installed, this module will not be usable by you. IMPORTING
-root This parameter is the prefix the other paths are relative to. If this parameter is not specified, it defaults to the Current Working Directory ( "CWD" ). In versions prior to 0.3.0, this value was mandatory. The rationale behind using "CWD" as the default value is as follows. o Most users of this module are likely to be using it to test distributions o Most users of this module will be using it in "$project/t/" to load files from "$project/share/" o Most "CPAN" tools run tests with "CWD" = $project Therefor, defaulting to "CWD" is a reasonably sane default for most people, but where it is not it can still be overridden. -root => "$FindBin::Bin/../" # resolves to project root from t/ regardless of Cwd. -share This parameter is mandatory, and contains a "hashref" containing the data that explains what directories you want shared. -share => { ..... } -module "-module" contains a "hashref" mapping Module names to path names for module_dir style share dirs. -share => { -module => { 'My::Module' => 'share/mymodule/', } } ... module_dir('My::Module') Notedly, it is a "hashref", which means there is a limitation of one share dir per module. This is simply because having more than one share dir per module makes no sense at all. -dist "-dist" contains a "hashref" mapping Distribution names to path names for dist_dir style share dirs. The same limitation applied to "-module" applies here. -share => { -dist => { 'My-Dist' => 'share/mydist' } } ... dist_dir('My-Dist') AUTHOR
Kent Fredric <kentnl@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Kent Fredric <kentnl@cpan.org>. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-24 Test::File::ShareDir(3pm)
All times are GMT -4. The time now is 04:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy