Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Displaying the current working directory in prompt Post 302436076 by premjotsingh on Friday 9th of July 2010 06:35:18 AM
Old 07-09-2010
I use ksh shell. Now can you help?
 

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

Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening (2 Replies)
Discussion started by: igandu
2 Replies

3. UNIX for Dummies Questions & Answers

How to change current working directory for dbx on UNIX?

How to change current working directory for dbx on UNIX? means I'll run pgm from one directory , but getcwd() should return path which I want to be, which is not d current dir :) (5 Replies)
Discussion started by: login0001
5 Replies

4. UNIX for Dummies Questions & Answers

Getting current work directory in Command Prompt

How to get the current working directory as part of the command prompt? Every time I chage the folder, my command prompt path shoud change. I am using Korn Shell. Any help is greatly appreciated. (3 Replies)
Discussion started by: MeganP
3 Replies

5. Shell Programming and Scripting

Displaying current user process

When I typed in ps -a I get this: PID TTY TIME CMD 31799 pts/3 00:00:00 vim 31866 pts/3 00:00:00 vim And to check who is currently logged in, I type who Felix Whoals Tada Whoals Lala Whoals How can I get the user process for all current users who logged in?? I think I need to combine... (14 Replies)
Discussion started by: felixwhoals
14 Replies

6. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

7. Shell Programming and Scripting

Current working directory in prompt

Can someone tell me how do i set my current working directory in my prompt? Note: I dont want to use env variable PWD and using `pwd` gives me only my home directoy. suggest a different way ? I use /bin/sh thanks!! (3 Replies)
Discussion started by: yesmani
3 Replies

8. UNIX for Dummies Questions & Answers

How can I show my "current" directory as the KSH prompt?

Hi All, This is an embarrassingly simple question and couldn't think of "keywords" to search for the answer, but how do I change my UNIX/KSH prompt to show the machine name and my "current" but not "full" directory? For example: if the machine name is "machine" and I'm currently in... (4 Replies)
Discussion started by: chatguy
4 Replies

9. HP-UX

Unable to Set Prompt to current working DIR

HPUX does not recognise \h,\w,\u to display the hostname,working directory and username respectively. So how do i set the PS1 variable to display my current working Directory as my prompt? I also tried PS1=$PWD, But it keeps showing the same directory path as prompt which PWD was holding at... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies

10. UNIX for Dummies Questions & Answers

Current working directory

Hi all, How do I print the name of my current working directory only to screen? Not pwd! For example, if I was in /home/work I am looking for 'work' only (4 Replies)
Discussion started by: jimjam
4 Replies
whatnow(1)						      General Commands Manual							whatnow(1)

NAME
whatnow - prompting front-end for send (only available within the message handling system, mh) SYNOPSIS
whatnow [options] [file] OPTIONS
Specifies the folder in which whatnow searches for the draft message. By default, the current message in the named folder is used. If you wish to specify another message, use the -draftmessage option. For more information on using a draft folder, see comp(1). The -draftfolder option can be set up in your user profile; see mh_profile(4) for more information. Specifies the draft message to be used. If you specify a folder with the -draftfolder option, the -draftmessage option takes the number of a message in that folder. If you do not specify a folder, -draftmessage takes the name of a file. If you do not give an absolute pathname (one beginning with a / or or ), -draftmessage assumes that the file is located in your Mail directory. (This is different from the file argument to whatnow, which assumes that the file you name is in your current working directory.) Specifies the name of the editor you want to use to edit the draft message. Any legal edi- tor can be specified. This option is used only if you select the edit response to the What now? prompt. Prints a list of the valid options for this command. Prevents the initial invocation of an editor when an MH command is run. Normally, when you enter an MH command such as comp, dist, forw, or repl, the whatnow program is called to start the initial edit of the draft message. If you add this option to the whatnow entry in your is disabled. This is a convenient way of disabling this edit for all MH commands, rather than adding the -noedit entry to the entries for the individual commands in Specifies the prompt used by whatnow. The prompt you receive when you invoke whatnow can be specified as a string with this option. If the prompt contains spaces, you must enclose the entire string in double quotes (" "). The default prompt is What now? DESCRIPTION
After you have finished editing a draft message in comp, dist, forw or repl, the whatnow program prompts you for the next required action. Press <Return> at the What now? prompt to see a list of the available responses. These responses are: display [options] edit [editor] [options] list [options] push [options] quit [-delete] refile [option] +folder send [options] whom [options] For more information on the options available with these commands, see the following reference pages: refile(1), send(1), whom(1). Use display if you have been using repl or dist and want to see the original message. Use edit if you want to continue editing the draft. Use list to display the draft message. If you use push, send operates in the background and frees your terminal while the message is being sent. Use quit to exit from whatnow and to save the draft message. The -delete option to quit will exit from whatnow and delete the draft mes- sage. Use refile +folder to refile the draft message in a specified folder. The send response will cause the message to be delivered. Use whom to find out who will receive the mail when it is sent. Unless the -noedit option is given, the editor starts when whatnow is invoked. For the edit response, you can specify an editor if you wish to override the editor specified in your file. If you specify an editor with the edit response, any valid option to the editor is valid. Similarly, for the send and whom responses, any valid option to send and whom commands, respectively, are valid. For the push response, use any valid option to send. MH invokes send with the -push option. For the refile response, any valid option to the fileproc is valid. The fileproc is the element of your mail profile which defines the pro- gram used to refile messages in another folder. For more information, see mh_profile(4). For the display and list responses, any valid argument to the lproc is valid. If any non-option arguments are present, then the pathname of the draft is excluded from the argument list given to the lproc (this is useful for listing another MH message). The lproc is the element in your mail profile which defines the program used to display draft messages on your screen. For more information, see mh_profile(4). See mh_profile(4) for further information about how editors are used by MH. It also describes lproc and fileproc and shows how complex variables can be used to direct the actions performed by whatnow. Although whatnow is usually invoked by other commands, you can use it as a separate command. You can run whatnow on a named file by speci- fying the file as the file argument. If you do not give an absolute pathname (one beginning with a / or or ), whatnow assumes that the named file is in your current working directory. If you want to run whatnow on an existing message, use the -draftfolder and -draftmessage options. RESTRICTIONS
If the sendproc entry in your is send, whatnow uses a built-in program rather than running the regular send. If you define your own send- proc program, you should not call it send, as whatnow will not run it. PROFILE COMPONENTS
Path: To determine your MH directory Draft-Folder: To find the default draft folder Editor: To override the default editor lasteditor-next: To name an editor to be used after exit from lasteditor fileproc: Program to refile the message lproc: Program to list the contents of a message sendproc: Program to send the message whomproc: Program to determine who a message would go to EXAMPLES
In the following example, whatnow takes the current message in the folder +drafts, and asks what you want to do with it: % whatnow -draft- folder +drafts What now? In the following example, whatnow takes message 6 from the folder +drafts: % whatnow -draftfolder +drafts -draftmessage 6 What now? The following example sets the prompt to be Now What?: % whatnow -prompt "Now What?" Now what? FILES
The user profile. SEE ALSO
comp(1), send(1), whom(1) whatnow(1)
All times are GMT -4. The time now is 11:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy