MKS KORN SHELL WONT EXECUTE from windows command prompt


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting MKS KORN SHELL WONT EXECUTE from windows command prompt
# 1  
Old 12-07-2010
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 not found, is this a problem with the IF statement when i am comparing and launching the app or my syntax is wrong..please advise........

my script is as follows
Code:
#!/usr/bin/ksh
test1=1

echo $test1 
if(( $test1 == 1))
then

start "C:\Program Files\Internet Explorer\iexplore.exe"

fi


Last edited by Scott; 12-07-2010 at 03:15 PM.. Reason: Code tags, please...
# 2  
Old 12-07-2010
What Operating System(s) are you running? Please be specific and detail any additional packages or other hooks which you may have installed. There is no way that a standard M$ Windows at any version will execute a ksh script.

Please make it 100% clear which Operating System is running at the time you issue any commands and post all the error messages intact.

When you say you "schedule it" what precisely is the process which you are using to schedule the ksh script?

The ksh script looks syntactically incorrect. Does it actually work?


Imho. The whole concept is flawed. There is no sensible way to run M$ Internet Explorer in background (which is how a scheduler would work).

Nuf said. I'm sure that someone else will read the post differently.
This User Gave Thanks to methyl For This Post:
# 3  
Old 12-07-2010
got it ... thank you

@Methyl , the syntax was wrong , it took me a while to correct the syntax ,
x1=1
if [ "$test1" = "x1" ]
then start ie
fi

the OS is windows NT and the shell is MKS KORN SHELL, that came with windows NT
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

XFCE Desktop - trash, cannot execute file, command prompt here missing.

Hi there, I am using the xfce4 is already the newest version (4.12.5). thunar is already the newest version (1.8.4-1). The distribution is Linux kali 4.19.0-kali1-amd64 #1 SMP Debian 4.19.13-1kali1 (2019-01-03) x86_64 GNU/Linux However, the problem is: When I when I click on any program to... (2 Replies)
Discussion started by: alvinoo
2 Replies

2. Shell Programming and Scripting

Execute sql statment in korn shell

I am fairly new to writing scripts, and have gotten a lot of help from this site in the past with many of the posts. I have a question/issue with a script I am attempting to write and have a question regarding executing an sql statement inside of a loop (do while). I have in the past written... (1 Reply)
Discussion started by: josbor01
1 Replies

3. Shell Programming and Scripting

RFC - Korn shell prompt

Hi, I am learning shell scripting for the first time. I use AT&T Korn Shell, Version AJM 93u+ 2012-08-01, compiled from source on NetBSD. So far I have managed to set up what I think is a useful and pleasing shell prompt, which can be seen in the image attached to this post. The prompt is... (2 Replies)
Discussion started by: gezley
2 Replies

4. Shell Programming and Scripting

How to execute korn shell script from different directory

Guy's , I need to run korn shell script from different directory, usually I run the script using ./details.ksh in the same directory but now I need to run the file and process details using awk code. Now I am running the script this way but with no luck Directory = home/users/work ... (3 Replies)
Discussion started by: James_Owen
3 Replies

5. Shell Programming and Scripting

Shell script wont execute

Im using a script that writes a random line to a text file then executes another shell script. My problem is that the lottery shell script will not execute. Im not receiving an errors when running the shell script, and it copies a random line of text to mtest.txt fine. #!/bin/bash nscripts=2... (3 Replies)
Discussion started by: kylecn
3 Replies

6. Shell Programming and Scripting

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... (14 Replies)
Discussion started by: rookie2785
14 Replies

7. Shell Programming and Scripting

MKS Korn shell not working when schedule

Hi I have a sample MKS Korn Shell script, it is working fine when I am executing manually (i.e command prompt) but not when schedule through scheduler. here is the script, ls command working just fine manual run, so I thought it could be environment varilable so kept same PATH when running... (1 Reply)
Discussion started by: rkthoka
1 Replies

8. Shell Programming and Scripting

Database connection from korn shell prompt

Hello, I want to connect to Database through shell command line. Here is my command from putty, $ sqlplus -S ora/ora@ORA But I am not able to connact to database. If this command succed, what is the expected output on shell prompt? Could you please let me know how to connact to... (3 Replies)
Discussion started by: Poonamol
3 Replies

9. Shell Programming and Scripting

execute shell file on DOS prompt

I have installed cygwin on my computer having windows 2003 server as operating system. The following command works fine on DOS console: bash launch_update.sh Is there any way, that i could run the above shell file, just by typing its name on DOS prompt, in the same way as batch files are... (1 Reply)
Discussion started by: mmunir
1 Replies

10. What is on Your Mind?

Windows and the Korn shell

I just found this story about how microsoft tried to integrate Unix like shell scripting in NT. It dates back 1997 but it is still funny: And David Korn version of it: http://slashdot.org/articles/01/02/06/2030205.shtml (0 Replies)
Discussion started by: ripat
0 Replies
Login or Register to Ask a Question