My operating system is windows xp and my server is Linux. I have developed a code in perl(saved in shell file).
I want to connect to Linux machine from Windows using your script only and then run a script on linux and this should be done on daily basis and automatically also.
Is it possible to do that?
Shell file under windows? that's called a batch file
Here is an example how you can set up a scheduled task on windows
If your remote machine is on linux, you can read here how you can set them.
You have several options to run the script on remote machine:
copy the file on the remote machine in the same location with the same file name (with ftp or ssh you can do this with another script) and set the linux machine's cron job to execute that same file daily
install a (web) server on the linux machine and create a web page through which's interface to upload and execute the script (this way you don't have to set up a cron job on linux)
create a script on the linux machine which to connect to another service (like a ftp location), download the needed script (the one which you want to execute) and execute it. Put the downloading script in your cron to execute whenever you want
use Net::SSH::Perl in your script to run commands on the linux machine (for this, you need ssh access to that machine, obviuosly)
Yes. Create a Scheduled Task which runs the PERL.exe with the script file name as an argument.
Related
Run Denodo Platform sh files using Command Line Linux Remote Server.
Denodo Platform showing GUI to start Virtual DataPort, and I can only interact using Command Line only.
Is there a way to do this?
ssh into the server and go to your DENODO_HOME\bin folder
run this command there:
sh vqlserver_startup.sh
I have created selenium testng.xml file and make windows batch file for my local window machine and Jenkins build now function perfectly working
But now client expectation is run jenkins projects for same selenium script in Linux server machine.
I m not aware about how can i start for my testng file for linux server?
You created batch file while working with testng.xml on Windows. You would create an equivalent shell file while working with testng.xml on Linux.
Once done, Go to Jenkins Job configuration build section and select Execute Shell option.
Put you shell script in command window or execute shell file directly from command window itself.
To execute shell file, use below syntax:
./<file>
I have an automated Linux agent (CentOS) with Bamboo to aid in building and deployment of new software onto a board. I want to be able to run .cmm files via Trace32 and a Lauterbach onto my locally located board using the remote Bamboo agent to trigger daily builds and deployment.
I am aware of the terminal command option: ./trace32 -s file.cmm to avoid using the GUI.
Is there anyway I can use this kind of thing for remote deployment, perhaps utilising ssh?
There is no SSH server in TRACE32. However you can control TRACE32 remotely via the TRACE32 remote API. See the document "api_remote.pdf" in the PDF folder of your TRACE32 installation.
To launch some scripts or execute some simple commands from a bash shell, you can use the command line tool t32rem from the <t32>/bin/linux folder.
This tool uses the TRACE32 remote API to send TRACE32 commands to open TRACE32 GUIs.
Do the following:
Enable the TRACE32 remote API to add the following two lines to your TRACE32 configuration file (usually "config.t32")RCL=NETASSIST
PORT=20000 You have to ensure that there is an empty line before and after these lines in your configuration file.
Launch TRACE32 and send a command to it with t32rem like that: t32rem localhost port=20000 <command> For <command> you can choose any TRACE32 command like DO file.cmm to execute your mentioned PRACTICE script.
For more complex remote control of TRACE32 (e.g. from a Python script) you should have a look at the previously mentioned "api_remote.pdf" and the examples at <t32>/demo/api.
When you already have a command to run, how about using a Script task in your plan, so that you can execute the command you wanted?
I am having several Linux machine in my DC and i need to create one script in Windows Server which will create users on Linux machines. Please suggest.
If you have OpenSSH installed, just run this in your batch file once per linux client:
ssh root#linux-machine "adduser user_name --home /home/user_name"
Try to give a look to expect for Windows. Like the Unix version, you can remotely execute interactive commands.
I want to execute shell script whenever I start my ec2 (Linux )instance first time
Any Suggestion Please.
For the time being you can add the entries/command in initrd file and you can create a softlink for it. This will help you to execute the shell script whenever u will start your linux machine whether it is on EC2 or on linux.
See "Running Commands on Your Linux Instance at Launch".
You can use "user data" or "cloud-init" to do it. There's a section when manually launching EC2 instances to add the user data, and you can do it through APIs too.