LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-16-2009, 11:05 AM   #1
nano2
Member
 
Registered: May 2007
Posts: 100

Rep: Reputation: 15
exiting from a windows command


Hi ,

I have the following scenario where by i am accessing a windows machine running a command when the command finished and is sucessful it will return o
So i am cecking before i exit but I seem to always exit with return code 1

Any ideas why ?

telnet <windows machine ><<EOF

run some java within the windows machine !

echo the returncode is %errorlevel%

if %errorlevel% neq 0
exit 1

EOF
 
Old 10-01-2009, 05:08 AM   #2
Keith19
LQ Newbie
 
Registered: Jul 2003
Location: England
Distribution: Ubuntu. Knoppix. PCLinuxOS.
Posts: 6

Rep: Reputation: 2
Hi Nano2,

Really just guessing at this, but is return code 1 showing because it is echoed as part of the script? Try:

if %errorlevel% neg 0
if %errorlevel% pos 1
exit
EOF

OR just:

if %errorlevel% neg 0
exit
EOF
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Exiting BASH function without exiting sourced environment SwingingSimian Programming 10 08-12-2009 12:59 AM
command line to Exiting X windows ? Nauht Linux - General 2 11-22-2005 06:37 PM
RHLinux 9.0 hangs when exiting command line mellsie25 Linux - Newbie 2 10-17-2003 09:27 PM
exiting X windows in Mandrake jang Linux - Software 4 12-07-2002 10:59 PM
Exiting X-Windows wonderpun Slackware 4 08-27-2002 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration