11-17-2012
SOLVED
Quote:
Originally Posted by
elixir_sinari
That should not be a problem at all. The last ;; in the case construct is optional.
@OP: To which if does the fi on line 62 correspond?
yeah its not the
;; in the
case, it's not required at the end of the case statement (although it isn't a bad habit). it IS required for multiple case statements. And as far as the
fi on line 62, I was just reviewing my code, and it was one of those things that I just kept looking over and I noticed. I got on here to post this as resolved. The
fi was a mistake due to the copy and pasting from the other scenario of the game. I know copy/paste causes a lot of errors and I browsed it for misplaced quotation marks and various other errors, but I forgot that the whole statement that I copied was part of an if statement from the other scenario. That
fi on line 62 should not have been there, there only should have been the one on line 60 but thank you so much for your prompt response to this. I've just began learning scripting and bash as a whole about 4 days ago, so I'm sure this is going to be a go-to source for help in this text based game. I'm just trying to find a way to spice it up and once I do I'm sure I'll have way more complicate code than [ICODE]case[/ICODE[,
while/do and nested
if statements!!
9 More Discussions You Might Find Interesting
1. Linux Benchmarks
I created two computers with identical hardware, and run the benchmark programs in both starting at the same exact time.
What makes no sense is that the computer that has the lower average index (121) finished the race a good 30 minutes ahead of the computer wich showed the higher avg index... (0 Replies)
Discussion started by: philip_38
0 Replies
2. UNIX for Dummies Questions & Answers
I have 3 files in directory mydir named as follows, I run the sequence of commands shown below and I have questions at the result.
File names are:
ABC_GP0
ABC_GP0.ctl
ABC_GPX
Commands and results:
$ ls /mydir/ | grep *
<-- (q1) I get nothing - OK
$ ls /mydir/ | grep... (5 Replies)
Discussion started by: GNMIKE
5 Replies
3. Shell Programming and Scripting
Hi, I've been running code which very frequently calls books.csv. e.g:
grep -i horror books.csv > tempExcept, I'm trying to move away from using temporary files or frequently calling books.csv to improve efficiency. So I tried something like
bookfile=$(cat books.csv)
grep -i horror... (4 Replies)
Discussion started by: Quan
4 Replies
4. Shell Programming and Scripting
Hi,
I have written a small shellscript
Imagine dbalt.txt already existed...
"
....
touch report.txt
lynx -dump "http://site.com/index.htm" > site1.txt
lynx -dump "http://site.com/index2.htm" > site2.txt
grep -E 'Nummer: |EUR' site1.txt > preis1.txt
grep -E 'Nummer: |EUR' site2.txt >... (2 Replies)
Discussion started by: Blackbox
2 Replies
5. UNIX for Dummies Questions & Answers
Is there a textbased football game (American) that I can download through ubuntu server edition? (1 Reply)
Discussion started by: dadoprso
1 Replies
6. Shell Programming and Scripting
Okay so Zork sparked my interest in this. I have been learning to program for the last year and a half. I've dabbled in everything from Java to Ruby to PHP & XHTML & SQL, and now I'm on bash. I really like bash scripting. Its easy and fun. I just started two days ago. Pretty much I've been writing... (1 Reply)
Discussion started by: lemonoid
1 Replies
7. Programming
Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an error... (1 Reply)
Discussion started by: lemonoid
1 Replies
8. UNIX for Dummies Questions & Answers
Hello, I am looking to make a text based game, that runs in the command window, or a window similar. I will only need to use 1 window.
I read somewhere that there is libraries for this kind of thing? But I can't remember the name of them.. Can anyone point me in a direction?
I will be... (2 Replies)
Discussion started by: murphy
2 Replies
9. Shell Programming and Scripting
Hello guys I'm new to shell scripting and I need to make a game using shell script. I want to know if it is possible for me a total noob to shell scripting to make this game.
The game concept is simple:
First thing when you launch the script you get a menu in which you select if you want to... (3 Replies)
Discussion started by: Othmane
3 Replies
LEARN ABOUT DEBIAN
rdf::redland::statement
RDF::Redland::Statement(3pm) User Contributed Perl Documentation RDF::Redland::Statement(3pm)
NAME
RDF::Redland::Statement - Redland RDF Statement Class
SYNOPSIS
use RDF::Redland;
my $statement1=new RDF::Redland::Statement($statement);
my $statement2=new RDF::Redland::Statement($subject,$predicate,$object);
...
if($statement->subject->equals($node)) {
...
}
DESCRIPTION
Manipulate RDF statements which comprise three RDF::Redland::Node objects. Also used for partial statements which can have empty parts and
are used for matching statements in statement queries of the model - see the RDF::Redland::Model.
CONSTRUCTORS
new NODE NODE NODE|STATEMENT
Create a new statement from nodes or copy an existing statement.
If three NODEs are given, make a new statement from them. Each Node can be a Redland::RDF:Node, a Redland::RDF::URI, a perl URI or a
string literal. Otherwise STATEMENT must be an existing statement to copy.
clone
Copy a RDF::Redland::Statement.
METHODS
subject [SUBJECT]
Get/set the statement subject. When a RDF::Redland::Node SUBJECT is given, sets the subject of the statement, otherwise returns a
reference to the statement RDF::Redland::Node subject.
predicate [PREDICATE]
Get/set the statement predicate. When RDF::Redland::Node PREDICATE is given, sets the predicate of the statement, otherwise returns a
reference to the statement RDF::Redland::Node predicate.
object [OBJECT]
Get/set the statement object. When RDF::Redland::Node OBJECT is given, sets the object of the statement, otherwise returns a reference
to the statement RDF::Redland::Node object.
as_string
Return the statement formatted as a string (UTF-8 encoded).
equals STATEMENT
Return non zero if this statement is equal to STATEMENT
OLD METHODS
new_from_nodes SUBJECT PREDICATE OBJECT
Create a new RDF::Redland::Statement with the given RDF::Redland::Node objects as parts (or undef when empty for a partial statement).
Use instead:
$a=new RDF::Redland::Statement($subject, $predicate, $object);
new_from_statement STATEMENT
Create a new RDF::Redland::Statement object from RDF::Redland::Statement STATEMENT (copy constructor). Use instead:
$s=$old_statement->clone;
SEE ALSO
RDF::Redland::Node
AUTHOR
Dave Beckett - http://www.dajobe.org/
perl v5.14.2 2011-02-04 RDF::Redland::Statement(3pm)