Hi,
I'm new here so please excuse any stupidity that occurs in my post :P
My situation:
Have a java program which I have to run a ridiculous amount of times and put the output data into a text file.
Thought the easiest way to do this would be to delve into the world of scripts.
I am at home (on a mac) with remote access to my university computers (linux).
Wrote a script which I think might possibly work:
I uploaded it into the same directory as the code
Followed some instructions on the internet to chmod it using:
Where RMIScript is the name of the script.
Tried to run it using both:
and
however both come out with errors 'cannot open =: No such file'
Any advice would be appreciated.
Edit:
Changed code to:
same error.
Last edited by lozyness; 11-05-2009 at 09:45 AM..
Reason: Change in code
I am new to shell scripting.
I tried to run a simple shell script using Cygwin terminal in Win XP env.
The script I have written is as follows -
#!/bin/bash
a=5
] && echo "true" || echo "false"
But when I execute the script, getting some confusing error. The error I am getting are - ... (3 Replies)
For a small script i want it so that the terminal closes when the script has completed its tasks.
To do so i use at the end if the script the following:
echo "Hello, World!"
echo "Knowledge is power."
echo ""
echo "shutting down terminal in 10 seconds"
exit 10
however the terminal stay's... (3 Replies)
Hi all, I have a script running on a Solaris 8 box and the first thing it does it check which user is executing it;
if ; then
echo "This script must be run as testuser" 1>&2
exit 1
fi
This works fine when manually running the script however when adding into that users' crontab it... (1 Reply)
Hi,
I'm trying the backup a few information commands of my Check Point FW (it's on a SPLAT linux machine). This is the script I wrote:
#!/bin/bash
cd /var/tmp/
file1=netstat_`/bin/date +%d%m%y`.txt
file2=ifconfig_`/bin/date +%d%m%y`.txt
file3=cpstatos_`/bin/date +%d%m%y`.txt... (2 Replies)
Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
suppose we have a file
ab
81
and another file
exec < $1
while read line
do
ssh root@172.16.1.$line
done
while running the command
sh file.sh ab
output display as shown
Pseudo-terminal will not be allocated because stdin is not a terminal.
root@172.16.1.81's password:
after... (3 Replies)
I have a very basic perl script that attempts to find if a process is running. If the process is not running then the script is supposed to start the process. If I execute the script from command line it works fine as expected. However if the script is executed via cronjob, the script cannot find... (1 Reply)
I'm trying to figure out how I can run a script "myScript.sh" in such a way that if my remote network connection gets disconnected, the script doesn't stop functioning.
Right now I log in, run "./myScript.sh" and watch my output get pumped to a log file for about 10 hours. Only problem is that... (3 Replies)
Hi Folks,
I have created a number of unix scripts that i can run from the scheduler on a server-side application that we use (Chordiant Marketing Director). All scripts are working except one. This last script is a user load script which first truncates a table and then loads it using a flat... (2 Replies)
...so I read "The Pragmatic Programmer" and they stressed the value of learning shell scripting!
I'm in a UNIX environment but have a Windows XP workstation.
I'm using Telnet to issue UNIX commands. I've done plenty of chmod's, command line ftp and stuff, but written no scripts to this point.... (1 Reply)