|
-
June 11th, 2004, 06:49 PM
#1
set a variable with output from a command
Here's something I need to do in an NT shell command which is very simple in unix. I want to set a variable with the result of another command. On unix, I can say "curdir=`pwd`" and the value of curdir will be set to the result of the pwd (print working directory) command. In Windows shell scripting this appears to be impossible! Can someone suggest a workaround?
-
June 11th, 2004, 08:42 PM
#2
should find your answer here
http://www.microsoft.com/technet/pro.../shellscr.mspx
something like this?
The current prompt text is stored in the PROMPT environment variable. Changing the prompt changes the value of this variable and vice versa. Thus, these two commands have the same effect:
1. C:\>prompt [$p]
2. C:\>set PROMPT=[$p]
this as been quoted from that site
Last edited by bobo; June 11th, 2004 at 08:46 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|