Sponsored Content
Top Forums Shell Programming and Scripting Use Unix shell script to open Windows command prompt (cmd) Post 302545997 by rookie2785 on Wednesday 10th of August 2011 06:49:25 AM
Old 08-10-2011
Use Unix shell script to open Windows command prompt (cmd)

Hello,
I work on Windows and I use Putty to access a remote UNIX server.
I am trying to build a shell script that will have as main task to open the
Windows command prompt (cmd) and run some Windows commands thereafter. The commands are actually file transfer commands that will download a file from the Unix server onto my local computer (Windows). I will specify all the commands within a text file and will pass that file
when calling the Windows command prompt so that they are then executed.

The challenge is how to call a Windows program (i.e. command prompt here) using Unix shell script!!!

The commands for the file transfer are working well, already tested. I'm using WinSCP. But the big thing as said is that I shall initiate that call from Unix (shell script).

Please help!
Any idea?

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Interaction shell cmd prompt

hi , how do i interact with the shell prompt. i need no. of args to be dynamic e.g $> type the no of args: <input from keyboard> Enter the 1 st arg : <input from keyboard> Enter the 2nd arg : <input from keyboard> ......... ......... let me know how to do it ... (1 Reply)
Discussion started by: adityamahi
1 Replies

2. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

3. Shell Programming and Scripting

open terminal to run cmd using shell script

i want the shell script to open the terminal and in that terminal i want to run a command specified in the script... how can it be done... (2 Replies)
Discussion started by: chandrabhushan
2 Replies

4. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

5. Homework & Coursework Questions

Unix Shell Script to prompt customer for name etc

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: How do I create a shell script called 'custinfo' to prompt a customer to enter and display back the following:... (4 Replies)
Discussion started by: SQLScript
4 Replies

6. Shell Programming and Scripting

MKS KORN SHELL WONT EXECUTE from windows command prompt

Can anybody help me with this small script , the script works fine and launches the IE from c:\documents and settings \test\my documents>ksh prompt $RunURL1.sh this scitpt works and launches the ie from ksh , but when i schedule it to run the script then i get the error box saying command:1... (2 Replies)
Discussion started by: venu
2 Replies

7. Windows & DOS: Issues & Discussions

script to open new cmd prompt for devices on visio

Hello, Can any one please help: I have a lab design on Visio, with routers and switches. What I am planning to do is: when I double click a device icon - it should open a new cmd prompt window and automatically performs the telnet session and log's me into the device. Appreciate your... (0 Replies)
Discussion started by: sureshcisco
0 Replies

8. Shell Programming and Scripting

how to change unix cmd display prompt?

I am new to to unix and I want to make my own basic shell. What is the code I can use to change the unix cmd console display? For example my unix display prompt says MyCompterName~, I want it to say WhatEverMan~ (3 Replies)
Discussion started by: megaearth77
3 Replies

9. UNIX Desktop Questions & Answers

Can Unix access Windows' File through Command Prompt in Unix

Hi all, I wish to know whether Unix can access window's file in Unix's terminal? Apart from that, how to copy files or share files between Window and Unix? I get to know of secure copy, however, my company's Unix does not support the feature of secure copy? Any other method for me to share/... (5 Replies)
Discussion started by: jessy83
5 Replies

10. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
CFDPADMIN(1)							 CFDP executables						      CFDPADMIN(1)

NAME
cfdpadmin - ION's CCSDS File Delivery Protocol (CFDP) administration interface SYNOPSIS
cfdpadmin [ commands_filename | . ] DESCRIPTION
cfdpadmin configures, starts, manages, and stops CFDP operations for the local ION node. It operates in response to CFDP configuration commands found in the file commands_filename, if provided; if not, cfdpadmin prints a simple prompt (:) so that the user may type commands directly into standard input. If commands_filename is a period (.), the effect is the same as if a command file containing the single command 'x' were passed to cfdpadmin -- that is, the ION node's cfdpclock task and UT layer service task (nominally bputa) are stopped. The format of commands for commands_filename can be queried from cfdpadmin with the 'h' or '?' commands at the prompt. The commands are documented in cfdprc(5). EXIT STATUS
0 Successful completion of CFDP administration. EXAMPLES
cfdpadmin Enter interactive CFDP configuration command entry mode. cfdpadmin host1.cfdprc Execute all configuration commands in host1.cfdprc, then terminate immediately. cfdpadmin . Stop all CFDP operations on the local node. FILES
See cfdprc(5) for details of the CFDP configuration commands. ENVIRONMENT
No environment variables apply. DIAGNOSTICS
Note: all ION administration utilities expect source file input to be lines of ASCII text that are NL-delimited. If you edit the cfdprc file on a Windows machine, be sure to use dos2unix to convert it to Unix text format before presenting it to cfdpadmin. Otherwise cfdpadmin will detect syntax errors and will not function satisfactorily. The following diagnostics may be issued to the logfile ion.log: cfdpadmin can't attach to ION. There is no SDR data store for cfdpadmin to use. You should run ionadmin(1) first, to set up an SDR data store for ION. Can't open command file... The commands_filename specified in the command line doesn't exist. Various errors that don't cause cfdpadmin to fail but are noted in the ion.log log file may be caused by improperly formatted commands given at the prompt or in the commands_filename file. Please see cfdprc(5) for details. BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu> SEE ALSO
cfdprc(5) perl v5.14.2 2012-05-25 CFDPADMIN(1)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy