Sponsored Content
Top Forums Shell Programming and Scripting Running windows command from Unix Post 83614 by parola on Friday 16th of September 2005 10:04:32 AM
Old 09-16-2005
what's u have ??
- Unix
- What's mapping u use ????
- Windows

Last edited by parola; 09-16-2005 at 11:25 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Updating a csv file held on a unix box with excel running on windows

Hi, my question is quite simple: Can I update a csv file which is held on a unix box (and which a script on the same box uses) with Microsoft Excel running in a windows environment? Or, is there a free spreadsheet package available to run in unix that will update my csv file. I know it's easy to... (5 Replies)
Discussion started by: Sn33R
5 Replies

2. UNIX for Dummies Questions & Answers

Running a UNIX command from Windows

Hi I need to run a UNIX command from Visual C++ Windows program. I was thinking of the Windows program generating a dummy file on the UNIX drive. On the UNIX box I could have a simple FORTRAN porogram searching continually for this dummy file and executes the UNIX command when the file... (2 Replies)
Discussion started by: robbiegregg
2 Replies

3. UNIX for Advanced & Expert Users

Running windows command from Unix

-------------------------------------------------------------------------------- Hi, Is there any way to invoke a Windows command from Unix ?? For eg: I want to track down a user executing a script and want to send him a message through net send in windows .. I am able to get the user... (1 Reply)
Discussion started by: Sabari Nath S
1 Replies

4. UNIX Desktop Questions & Answers

Running MS-windows GUI from unix/linux

Hi i need some help , i would like to run a GUI application on windows from unix i dont need to see the gui just to activate it from remote . it shoud be from CLI on the unix . thanks GUY (1 Reply)
Discussion started by: koreng
1 Replies

5. UNIX for Dummies Questions & Answers

Running UNIX commands remotely in Windows box from Unix box – avoid entering password

I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked. Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies

6. Windows & DOS: Issues & Discussions

Running UNIX in windows environment ?

Hi... I have planned to run UNIX application in window environment such as cygwin. Actually, I have download the "cygwin" software but there are some libraries are not applicable in the software. Due to that, anybody know any others unix sofware can be run in windows XP environment ? (1 Reply)
Discussion started by: bh_hensem
1 Replies

7. AIX

Running unix command from windows? How?

Hello Folks, I have a need to execute certain scripts on a regular basis on a number of (AIX) servers. What I had in mind, is to accomplish this using ssh/rsh, auto login. Initially I developped the script, which can be invoked from one of the AIX servers (by loggin into the first host), and... (4 Replies)
Discussion started by: haroon_a
4 Replies

8. Shell Programming and Scripting

To access UNIX server from Tk application running on Windows

Hi, I am new to this forum and this is my first post. I want to know that if I make an application in Tk (version of Tcl to create GUI) in windows and want to run to UNIX server, is it possible ? In other words, can I access a UNIX server through a Tk application running on windows ? ... (1 Reply)
Discussion started by: ratneshnagori
1 Replies

9. Solaris

Running unix script from windows.

Hi All, I need to call a unix script from windows bat file, please help if that can be done. I cant install cygwin or putty or any other ssh on server.....! do we have anything else? (8 Replies)
Discussion started by: fidelis
8 Replies

10. 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
Net::CLI::Interact::Manual::Cookbook(3pm)		User Contributed Perl Documentation		 Net::CLI::Interact::Manual::Cookbook(3pm)

NAME
Net::CLI::Interact::Manual::Cookbook - Miscellaneous recipes Windows Support The library works just fine under native windows (i.e use something like Strawberry Perl - no need for cygwin), for Telnet, Serial and SSH connections. However one additional step is required for you to have success: You must download the "plink.exe" application, and pass its filesystem location in the "app" parameter to "new()". Do not try to use any other Telnet or SSH programs (for instance the Windows bundled "telnet") - they will not work. Here's an example: my $s = Net::CLI::Interact->new( personality => "cisco", transport => "Telnet", (Net::CLI::Interact::Transport::is_win32() ? (app => "$ENV{HOMEPATH}\Desktop\plink.exe") : () ), ); Unix Support The library works fine on most Unix platforms. It will try to use the native "telnet", "ssh" (openssh) and "cu" programs for Telnet, SSH and Serial connections, respectively. If you want to use another application, pass it in the "app" parameter to "new". In some Unix environments there can be zombie child processes left around after running your script. If this happens, set the "reap" option, like so: my $s = Net::CLI::Interact->new( personality => "cisco", transport => "Telnet", connect_options => { reap => 1, }, ); Phrasebook Entries Prompts These are nothing more than named regular expressions: prompt configure match /(config[^)]*)# ?$/ Macros This example waits for the device to ask "[startup-config]?" and then responds with the text "startup-config". macro copy_run_start send copy running-config startup-config match /Destination filename [startup-config]?$/ send startup-config To send instead a press of the Return key (output record separator), use: macro write_mem send copy running-config startup-config match /Destination filename [startup-config]?$/ send '' To instead allow the user to pass in the file name, use a "sprintf" format. macro save_to_file send copy running-config startup-config match /Destination filename [startup-config]?$/ send %s The user must then pass a parameter to the "macro" call, even if it's an empty string: $s->macro('save_to_file', { params => ['file_name'] }); # or $s->macro('save_to_file', { params => [''] }); Continuations These are Macros which start with a match instead of a send: macro more_pages match / --More-- / send ' ' Note that the parameter of the "send" is not sent with a Return character (output record separator) appended. When included in a macro, the continuation can be in-line, like this: macro show_ip_route send show ip route follow / --More-- / with ' ' Running Commands Standalone Commands Simply send the command you wish to execute to the library. If not already done, a connection to the device will be established automatically: $s->cmd('show ip int br'); Normally this matches against a default prompt, which has been discovered automatically, or set by you: $s->set_prompt('user_prompt'); It's also possible to pass in a custom prompt for this command only: $s->cmd('show ip int br', { match => qr/special prompt>$/ }); Composite Macro Commands Call a predefined Macro from the phrasebook using this method: $s->macro('write_mem'); Sometimes the Macro needs parameters: $s->macro('to_priv_exec', { params => ['my_password'] }); You can't really create a Macro on the fly very easily, but with suitable use of "cmd()", "set_prompt()", and the "match" option to "cmd()" it's possible to achieve some simple flexibility. Reconfiguring On-the-Fly Phrasebook It's possible to load a new phrasebook by the following method, which must be passed at least the name of the personality: $s->set_phrasebook({ personality => 'ios' }); You can pass any options which the Phrasebook module itself would take. Prompt The current prompt can be changed by passing the name of the new Prompt as it is known by the phrasebook: $s->set_prompt('name'); If you want to test whether the current prompt matches a diffrent named Prompt from the phrasebook, this method can be used: $s->prompt_looks_like('name'); perl v5.14.2 2012-06-12 Net::CLI::Interact::Manual::Cookbook(3pm)
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy