Command-line parameters

  • Thread starter Thread starter AJK
  • Start date Start date
A

AJK

Hi,
Under one of the POSIX command shells, you reference the command line
paramter from a previous command, i.e
ping mail.xyz.com - pings the host mail.xyz.com
Then you can type:
telnet !$ 25
Which is the same as typing:
telnet mail.xyz.com 25

So the !$ translates as the 1st command line paramater.

Does anyone know if this is possible from the Windows command line?

Cheers,
Andy
 
AJK said:
Hi,
Under one of the POSIX command shells, you reference the command line
paramter from a previous command, i.e
ping mail.xyz.com - pings the host mail.xyz.com
Then you can type:
telnet !$ 25
Which is the same as typing:
telnet mail.xyz.com 25

So the !$ translates as the 1st command line paramater.

Does anyone know if this is possible from the Windows command line?

Yes I do. No it's not.

/Al
 
In microsoft.public.win2000.cmdprompt.admin Al Dunbar [MS-MVP]
wrote:
Yes I do. No it's not.

Just in academic interest it may be possible to recover something
useful from %cmdcmdline% in a new cmd.exe instance. Practically
useless in the context of the OP's question though.
 
Mark V said:
In microsoft.public.win2000.cmdprompt.admin Al Dunbar [MS-MVP]
wrote:
Yes I do. No it's not.

Just in academic interest it may be possible to recover something
useful from %cmdcmdline% in a new cmd.exe instance. Practically
useless in the context of the OP's question though.

The problem is that getting something useful from parsing that variable is
going to be more work than the simpler solution that I somehow missed
because this does the same thing a different way:

ping mail.xyz.com
<up><home><del><del><del><del>telnet<enter>

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top