TPWW Forums  

Go Back   TPWW Forums > o t h e r > computer help forum

 
 
Thread Tools Display Modes
Old 01-19-2013, 02:14 PM   #1
drave
In His hands...
 
drave's Avatar
 
Posts: 25,168
drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)drave makes a lot of good posts (200,000+)
Basic shell scripting

I am currently in a couple programming classes and have zero experience in programming, but pretty good elsewhere. We are given a step by step example from the book and I have actually copied and pasted the code. The issue I am coming across is when I force an error to try to get the appropriate error response, I get "is was unexpected at this time". The actual program will work all except giving the appropriate error msg.

@ECHO off


TITLE "KnockKnock1.bat - Tried and true, but still funny!"



COLOR 0E

CLS


ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.


SET /p reply="Knock Knock! C:>"

CLS


IF NOT %reply% == "Who is there?" (

ECHO "Sorry, you need to use quotes around your reply please."

GOTO :EOF )


ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

SET /p reply="Orange! C:>"



CLS



IF NOT %reply% == "Orange who?" (

ECHO "Sorry, you need to use quotes around your reply please."

GOTO :EOF )


ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.



ECHO "Orange you glad you've written your first Windows shells script?"



ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.

ECHO.
drave is offline  
Old 01-19-2013, 02:37 PM   #2
Bad News Gertner
Best Poster
 
Bad News Gertner's Avatar
 
Posts: 56,903
Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)Bad News Gertner makes a lot of good posts (200,000+)
You take the hard drive and use your java and then SHOVE IT UP YOUR BUTT!!!!!

haw haw haw
Bad News Gertner is offline  
 

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 On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 12:02 PM.


Powered by vBulletin®