👤
Home Man
Search
Today's Posts
Register

All Windows and DOS questions should go here as well. Discuss UNIX to Windows (Desktop or Server) here!

DOS Equivalent of UNIX Command

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 12-19-2012
DOS Equivalent of UNIX Command

Hi,

The title of this post is a little vague but I couldn't think of what to call it.

In Unix you can perform the following command
Code:
ftp -v IPADDRESS <<END
    put FILE
END

In a DOS command prompt, is it possible to do the same kind of thing that the "<<END" does?

So for example, I want to open a command prompt from VB6 and pass keypresses to that window but have everything output to a file.

In Unix I could do the following
Code:
bash <<END > FILENAME.txt
# The following would be sent as keypresses
echo -n "This"
echo -n "is"
echo -n "a"
echo "test"
END

This would then create a file with "This is a test" as the contents.

I hope I'm not sounding too confusing.

Any help would be greatly appreciated.

Thanks!
# 2  
Old 12-19-2012
Unsure what you are trying to do, but...

In DOS, you can
Code:
copy con: testfile.txt

then type at the screen, and everything will be sent to the file until you do a CTRL-z to end the copying

or, maybe
Code:
echo abcdef >> testfile.txt

will append the abcdef to the end of the existing testfile.txt
# 3  
Old 12-19-2012
I don't think that is possible in DOS.

You can write a Batch File and put a PAUSE command to prompt user to press any key to continue. But there is no way to pass keystrokes.
The Following User Says Thank You to Yoda For This Useful Post:
Ste_Moore01 (12-19-2012)
# 4  
Old 12-19-2012
I agree with bipinajith - can't be done in DOS.
But - you can replace the standard command interpreter (command.com in older versions) by sth. like complus.com (a unix-like cmd interpr. for MS OSes) or the sh.exe found in Unxutils.
The Following User Says Thank You to RudiC For This Useful Post:
Ste_Moore01 (12-19-2012)
# 5  
Old 12-19-2012
Thanks for the help.

Quote:
Originally Posted by joeyg
In DOS, you can
Code:
copy con: testfile.txt

then type at the screen, and everything will be sent to the file until you do a CTRL-z to end the copying

or, maybe
Code:
echo abcdef >> testfile.txt

will append the abcdef to the end of the existing testfile.txt
Unfortunately, this isn't exaclty what I meant.

What I wanted was to be able to use VB6 to open a command prompt (which I've managed) and then telnet onto a server by sending keypresses to the command prompt (which I've also managed) and I wanted the output for the command prompt to be sent to a file on my local machine.

I thought the best way to do this would be an equivalent of << in Unix

I have however, managed to get around it by running my telnet commands on the server and sending its output to a file on the server and then using Inet to FTP the file to my local computer.

Thanks to everyone.
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
PHP Equivalent of the unix command vidhyaS Shell Programming and Scripting 0 06-27-2011 03:55 AM
dos/intel unix command equivalent MizzGail Windows & DOS: Issues & Discussions 6 02-06-2010 10:51 PM
Command for unix to dos conversion sureshg_sampat Shell Programming and Scripting 3 12-30-2009 11:12 AM
Windows command shell equivalent in Unix simonsimon Shell Programming and Scripting 10 04-30-2009 01:56 AM
what is the DOS equivalent of alias command? milhan Windows & DOS: Issues & Discussions 9 04-07-2009 03:40 PM
Unix equivalent of DOS set xxavier UNIX for Dummies Questions & Answers 3 07-11-2007 08:14 AM
Equivalent command for setlocal in Unix sonaluphale UNIX for Advanced & Expert Users 7 05-17-2007 07:10 AM
Command equivalent to DOS mode for SCO 5.0.6 jgt UNIX for Advanced & Expert Users 3 05-11-2007 07:10 AM
SQL Spool equivalent command in DOS stevefox Windows & DOS: Issues & Discussions 2 01-17-2006 08:18 PM
Question about DOS versus Unix Command? wmosley2 UNIX for Dummies Questions & Answers 1 12-09-2003 09:27 PM


All times are GMT -4. The time now is 10:24 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?