Programming :: Batch File To Run Unix Commands From Windows?

Nov 22, 2010

I need to write a windows batch file to run unix commands by logging onto a telnet unix server. For example , I might want the batch file to log onto the unix sever, run the ls command, collect the output in a file and ftp it back to my windows desktop

View 8 Replies


ADVERTISEMENT

Programming :: Write A Batch File For Windows That Starts Cygwin Tool And Runs Unix Scripts?

Nov 17, 2008

I need to write a batch file for windows that automatically starts the cygwin tool in windows and executes the unix scripts.Previously we had these scripts in unix server.Now we need to migrate them to Windows server.For this reason we are using cygwin tool that allows the scripts to be executed on Windows server.We had written a batch file that starts the cygwin tool,but we were not able to execute the unix scripts.How can we write a batch file such that it executes all the unix scripts in cygwin.

View 5 Replies View Related

General :: Execute Commands Over SSH In A Batch File?

Feb 17, 2011

I'm looking to, all in the course of one batch file:

ssh into a remote computer execute commands (per the batch file) on the remote host.

What options do I need to add to the ssh invocation so that the batch file executes the lines following the ssh invocation over the connection?

e.g., with sftp it's simply adding a -b /dev/stdin and then << EOF at the end; how do I do this with SSH?

View 1 Replies View Related

Programming :: Invoking UNIX Shell Commands From HTML Webpage

May 11, 2010

I have a few questions regarding HTML, UNIX and Javascript. I've been tasked with creating a fairly simple webpage that takes a few inputs. Each input must correspond to an argument in a UNIX command running on a server.On a UNIX server we have a script (.ksh) that takes 3 arguments. The result of the script is a data file which is FTP'ed to an external server. Let's forget about the FTP portion for now. I would like to know where I should begin.What I know so far:

1) I will need HTML to create the webpage. Skill level is high
2) I will need Javascript to make my webpage more interactive. Skill level is high.
3) I will need to understand the UNIX environment. Skill level is high.

View 8 Replies View Related

General :: Renaming Files In Batch With Unix RENAME?

Mar 6, 2011

I have files whose names look like this:Sim1-2_40.36.chr20_sb.foo.indel.novoalign.samSim1-2_40.36.chr20_sb.foo.indel.bwa.samWhat I want to do is to replace all indel with snp in the namesyieldingSim1-2_40.36.chr20_sb.foo.snp.novoalign.samSim1-2_40.36.chr20_sb.foo.snp.bwa.samBut why this unix command doesn't work

View 4 Replies View Related

Programming :: Print The Current Time Of My System With A Batch File ?

Dec 25, 2010

How can I print the current time of my system with a batch file. My os is ubuntu.

View 4 Replies View Related

Programming :: Getting Error In Ftp From Windows To Unix Box - Permission Denied

Mar 18, 2009

I have a written a java code to ftp a file from the windows box to unix box. It keeps giving me the following error : "java.io.FileNotFoundException: PORT 204,63,56,5,16,78: 550 Permission denied." I am able to ftp manually from windows to unix.

View 5 Replies View Related

General :: Get The MAC Address From Windows Xp And Remove It From A File On A Unix Box?

Mar 13, 2011

I am tring to get the MAC address from windows xp and remove it from a file on a unix box. This is what I have so far:

getmac | plink.exe -ssh -pw "my pw" -noagent -m commands.txt root@192.168.1.82
commands.txt
cd /root
tr '-' ':' | tr -d '[:blank:]'

now this is what I get

10:9A:CD:5F:04:8ADeviceTcpip_{5A79FE8D:F227:4B91:9459:2701486C5D94}

All I need is the MAC. Everything after Device* is not needed.The file is /var/db/captiveportal_mac.db. The MAC address are listed like this.

MAC1
MAC2
MAC3
MAC4
MAC5

View 11 Replies View Related

Ubuntu :: Understanding Roles Of Commands: At - Batch And Anacron

Nov 19, 2010

I'm trying to understand the role of the at command. Does cron use at to run its jobs? Or is at, and batch for that matter, a separate cue that is only stored while the computer is on. As for anacron, anacron on runs once a day and is geared for a computer that is turned of frequently, as opposed to a server when it is on all the time. I've already man'ed these commands, and googled. I'm just trying to understand more how they work.

View 2 Replies View Related

General :: Windows - View The Unix Permissions Of A File In A .zip Archive?

May 19, 2010

is there a way to view the Unix permissions for a file under Windows?

View 1 Replies View Related

Ubuntu :: Samba: Switching From Unix To Windows File Sharing?

Sep 9, 2010

I'm using [URL] to help set up my server for windows file sharing. I accedently pressed unix file sharing and now i can switch it to windows file sharing.it would be fine to uninstall the Unix file sharing and replace it with the windows counterpart.I have Ubuntu desktop 10.04 (because i keep getting an error with the kernel with the server editions)

View 1 Replies View Related

Ubuntu :: Commands For Batch Deleting Folders/files By Name/type?

May 18, 2011

I'm trying to clean up a few hundred thousand mp3 files and I'm dying to find a way to automate some of the mechanical tasks I keep doing. It seems like at least two of these tasks could be easily accomplished with something at the command line, but I don't have the chops/know-how to figure out how (and would really rather not trial and error with batch deleting files & folders...).

1) Delete all folders named "_MACOSX" (and all subfolders/files contained therein) -- Basically, I'd like to apply this command to a few hundred directories that may or may not contain a subfolder called "_MACOSX" that I'd really like to get rid of.

2) Delete all files named "*.m3u". -- Similar to the first, I want to automatically scan all directories and subdirectories in a given location for all instances of this file-type and delete them wherever they're found.

3) Move all files named *.txt", "*.doc", "*.pdf" to a specific location. -- Similar to the last, except instead of deleting, I'd like to just move them, so that if there is anything worth keeping, I can keep it.

View 3 Replies View Related

Programming :: System() Routine Returns: Access: Unix Error (2) No Such File Or Directory

Oct 23, 2010

I am running shell command through C program using system() routine.

I am executing "opcontrol --status" an executable using the this routine and I get the following error. access: unix error (2) No such file or directory

But when I give the complete path to the executable it runs perfectly.

The executable is installed in "/usr/local/bin/" And the path variable has this path.

View 1 Replies View Related

General :: Unix Commands Same For Mac And Ubuntu?

Aug 21, 2010

I wonder if the unix commands (cp, mv, grep, args etc) are the same for Mac and Ubuntu. Do they have the same parameter lists and so on or do they try to stay the same but are slightly different?

View 3 Replies View Related

Programming :: Writing Unix Shell Script To Pass File Name/path/creation Date?

Oct 7, 2009

I'm new to UNIX scripting; I�m stuck with the following I have an Oracle SQL script that takes three parameters

1- File Name
2- File Path
3- File creation date

Under UNIX I have a folder where files will be placed frequently and I need to upload those files to Oracle, what I need is a UNIX script that can do the following

Loop through Directory "/home/applmgr/snktmp"
Picks only files
Pass the file name to parameter &1

[code]....

Is the above possible? I already knows how to call the Oracle Script from UNIX Im only stuck on writing the UNIX part where it List the files attribute(name,path,date) and store them to parameters ,Looping until the last file in the directory If the above is not possible,then how can I create the below from the command line

Filename{concatenation Mark}filePath{concatenation Mark}creationdate
Filename{concatenation Mark}filePath{concatenation Mark}creationdate
Filename{concatenation Mark}filePath{concatenation Mark}creationdate
Filename{concatenation Mark}filePath{concatenation Mark}creationdate

View 4 Replies View Related

General :: Unix - Cat Command To Save Results Of Other Commands

Nov 26, 2010

This question may be silly and super easy for linux connaisseurs, but I was just wondering, for instance, I want to use the >find command to search for a file and send the results to a text file

View 5 Replies View Related

General :: Finding UNIX Networking Commands In Detail?

May 16, 2010

finding UNIX networking commands in detail?

View 6 Replies View Related

Programming :: Write Output Of Two Commands To A File?

Oct 12, 2010

I'm writing output of top command to a file However since top does not provide time I would like to append the 'date' command and then write all this to a file.

so something like top -d 1 -b; echo 'date' >>file

View 1 Replies View Related

Programming :: Trying To Convert Mass Of Textfiles From "Windows" To Unix Encoding?

Nov 6, 2010

What I am trying to do is to convert a mass of files from standard Windows text encoding to UNIX encoding(462 .txt files). After a bit of searching, I found this bit of code, changed the necessary parts, put in "Sleep" so I could see the output and ran it:

Code: #!/bin/bash
FROM=iso-8859-1
TO=UTF-8

[code]...

View 6 Replies View Related

General :: Single C/C++ Program Using Unix Commands To Retrieve The Username, Associated Static IP Address?

Mar 11, 2010

For monitoring a network [LAN] I need a single C/C++ program using unix commands to retrieve the username, associated static IP address, what time user logged in, log out, total time system used by user. so that if a system has several users who used it @ different times of the day... then i need details of all users me,time of log in, static IP &all

View 1 Replies View Related

General :: FTP Client As Like FTPS On Windows - Reading Series Of Ftp Commands From A Txt File

Apr 20, 2011

I am very new to Linux and trying to learn the shell scripting. Just to know is there any client in linux which does the same task as FTPS on windows. FTPS on windows can read series of FTP command from a txt file and execute them. Is there any way to do that same task, i mean reading series of ftp commands from a txt file, on linux suing shell or perl (any module)?

View 2 Replies View Related

General :: Convert Batch File Into A .sh File Will Not Work

Sep 16, 2010

I am trying to convert my batch file into a .sh file and i think i have it perfect but it just will not work, so obviously not perfect. This is the code for my batch file.

[Code]....

This works perfectly on my own computer without any problems. I want to host this on my Linux VPS (CentOS 5) and need it to be converted into run.sh. This is the code for my run.sh.

[Code]....

View 9 Replies View Related

Programming :: Unix Programming - Single Thread Server Can Support Exactly 2 Clients At Once

Sep 28, 2010

A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit

View 4 Replies View Related

Programming :: Unix Programming - Single Process That Does Not Start Up Any Other Threads

Sep 28, 2010

i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.

View 3 Replies View Related

Programming :: Batch Process Files In VI?

May 29, 2010

I'm completely new to scripting and I'm trying to figure out how to write a script that will get a list of all the files in a directorywn through any subdirectories.When I have the list I want to o each file in VI and change the fileformat. So far all I have been able to figure out is that VI can do the batch processing and that "ls -R" gets me the recursive file list. I'm still pretty clueless on how to do the batch process with the VI editor. I think I'm supposed to use the Ex mode but I don't know how to get the list of arguments from the filelist into the editor so they can be processed. If it matters the files were all written in a Windows editor and have gotten the MS carriage returns so I want to do a :set ff=unix command on all the files without having to go into each file manually, there are over 300 files that need updated.

View 3 Replies View Related

Programming :: How To Pause A Batch Script

Apr 7, 2011

As you already know there's a command in the "BATCH" language named pause which causes the program to get any random character and then continues the scripts (which is mostly used to keepscript running and preventing it to do its work and close the command prompt).Something like the "getch".Is there anything similar to this at bash?IMPORTANT NOTE: I don't want my script to stay opened, I want it to get a character (without hitting enter) and continue executing the rest of the script so please don't reply "Tick the keep the terminal opened option" or "Use read"

View 5 Replies View Related

Programming :: Wget Command Appropriate For Batch?

Jun 19, 2011

I have written the batch file which will go to the website, wait for input (download button/exit), move to the next algorithym and repeat. My problem is getting the batch file to click the stupid download button. Can I use wget, and can you show me how to use it or point me to a really good api?

Code:
@ECHO OFF
ECHO INSTALLING ADOBE FLASH PLAYER PLUGIN UPDATE

[code]....

View 6 Replies View Related

General :: How To Move Windows In Batch From One Display To Another

Sep 26, 2010

I have several program windows open on my main display (showing on my physical screen).I've created a second display for VNC connections (using vncserver :14).Is there a way I can move all open windows from the default display to the VNC display?

View 1 Replies View Related

Programming :: Batch Script For All Files In Folder?

Oct 9, 2010

I have a lot of pdf files and I want to convert them to a lower quality for the web. I tried to use the following command (using ghostscript): Code: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf Is there a way to make a batch to do this for all pdf-s in a folder?

View 4 Replies View Related

Ubuntu :: Run A .batch File?

Jul 31, 2010

I am trying to run a .batch file, I was wondering if this edit would make it work, this is a java application-loader.

Code:
#bin/bash
java -Xmx500m -cp .;Theme.jar Gui 0 1 lowmem members 32
pause

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved