Sponsored Content
Full Discussion: if-statement troubles
Top Forums Shell Programming and Scripting if-statement troubles Post 302341778 by doc.arne on Thursday 6th of August 2009 02:47:12 PM
Old 08-06-2009
Easy enough, but it worked. My book said one = should be enough
 

10 More Discussions You Might Find Interesting

1. Programming

compiling troubles

i keep getting the following error with the code segment below when i try to compile the program. The code is from 'defs.h' parse error before '(' parse error before ')' stray '\' in program this is the code segment and the error is on the second line of the segment #define... (1 Reply)
Discussion started by: token
1 Replies

2. UNIX for Dummies Questions & Answers

compariosn troubles...

Hi Guys, I am trying to compare using if, but keep getting some strange results. if ; then keeps creating the file 1 if ; then does not work at all if ; then does not work if ; then does not work if ; then does not work eihter. I am using a ksh, on Solaris (9 Replies)
Discussion started by: jagannatha
9 Replies

3. Programming

Troubles with HPUX

Hello I created an application in c language for HP-UX operative system,and it runs on a 32 bits PARISC processor. My problem is that I have to run this same application but now in a 64 bits Parisc processor. But I am not able to compile the application with the 64 bit server, and I only could use... (1 Reply)
Discussion started by: masterboy6666
1 Replies

4. UNIX for Dummies Questions & Answers

Password Troubles

I'm very new to UNIX (I just started working with Terminal 2 days ago) and I don't know the system very well. I'm having trouble whenever I am asked for a password. I simply... can't type. I press keys on the keyboard but no characters appear on the screen. For example, when I log onto... (5 Replies)
Discussion started by: alexmiller
5 Replies

5. UNIX for Dummies Questions & Answers

ssh2 troubles

I'm trying to set up a secure and trusted connection between 2 boxes running solaris using ssh2. I've run ssh-keygen2 on the local box and on the remote box, created the identification file ( IdKey id_dsa_2048_a ) on the local machine and copied across the public key file from the local to... (5 Replies)
Discussion started by: PaulC
5 Replies

6. Shell Programming and Scripting

Encoding troubles

Hello All I have a set of files, each one containing some lines that follows that regex: regex='disabled\,.*\,\".*\"'and here is what file says about each files: file <random file> <random file> ASCII text, with CRLF line terminatorsSo, as an example, here is what a file ("Daffy Duck - The... (3 Replies)
Discussion started by: tukuyomi
3 Replies

7. UNIX for Dummies Questions & Answers

Cron troubles

I am aware this question has been answered time and again. I feel I have tried everything I have seen on the net and really need help to get this working. Same old story. Shell script, working from command but not from cron. I need my script to take values from a .properties file. Tried... (2 Replies)
Discussion started by: airalpha
2 Replies

8. Shell Programming and Scripting

for loop troubles

What I have here is a pretty textbook recursive function. Its purpose right now is simply to display all folders that don't contain folders. It works fine in all instances I can think of... except one. If there is a folder with a space in its name, the thing goes Kablooie. AFAIK the problem comes... (5 Replies)
Discussion started by: divisionbyzero
5 Replies

9. BSD

PF troubles on OpenBSD 5.0

I am setting up a system as an ADSL gateway. ADSL is working fine. PF is not forwarding for some reason. # ifconfig lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33196 priority: 0 groups: lo inet6... (0 Replies)
Discussion started by: John Tate
0 Replies

10. Shell Programming and Scripting

Case Statement Troubles

Hi, I'm attempting to create case statement in a ksh script that does the following: Run a uname command against the box and use that value for $HOSTNAME object. Then, if hostname has AIX in it, then use the lsldap command to try to bind, then print $HOSTNAME:yes or $HOSTNAME:no, depending on... (7 Replies)
Discussion started by: tekster2
7 Replies
Graph::Easy::Parser::Graphviz(3pm)			User Contributed Perl Documentation			Graph::Easy::Parser::Graphviz(3pm)

NAME
Graph::Easy::Parser::Graphviz - Parse Graphviz text into Graph::Easy SYNOPSIS
# creating a graph from a textual description use Graph::Easy::Parser::Graphviz; my $parser = Graph::Easy::Parser::Graphviz->new(); my $graph = $parser->from_text( "digraph MyGraph { " . " Bonn -> "Berlin" }" ); print $graph->as_ascii(); print $parser->from_file('mygraph.dot')->as_ascii(); DESCRIPTION
"Graph::Easy::Parser::Graphviz" parses the text format from the DOT language use by Graphviz and constructs a "Graph::Easy" object from it. The resulting object can than be used to layout and output the graph in various formats. Please see the Graphviz manual for a full description of the syntax rules of the DOT language. Output The output will be a Graph::Easy object (unless overrriden with "use_class()"), see the documentation for Graph::Easy what you can do with it. Attributes Attributes will be remapped to the proper Graph::Easy attribute names and values, as much as possible. Anything else will be converted to custom attributes starting with "x-dot-". So "ranksep: 2" will become "x-dot-ranksep: 2". METHODS
"Graph::Easy::Parser::Graphviz" supports the same methods as its parent class "Graph::Easy::Parser": new() use Graph::Easy::Parser::Graphviz; my $parser = Graph::Easy::Parser::Graphviz->new(); Creates a new parser object. There are two valid parameters: debug fatal_errors Both take either a false or a true value. my $parser = Graph::Easy::Parser::Graphviz->new( debug => 1 ); $parser->from_text('digraph G { A -> B }'); reset() $parser->reset(); Reset the status of the parser, clear errors etc. Automatically called when you call any of the "from_XXX()" methods below. use_class() $parser->use_class('node', 'Graph::Easy::MyNode'); Override the class to be used to constructs objects while parsing. See Graph::Easy::Parser for further information. from_text() my $graph = $parser->from_text( $text ); Create a Graph::Easy object from the textual description in $text. Returns undef for error, you can find out what the error was with error(). This method will reset any previous error, and thus the $parser object can be re-used to parse different texts by just calling "from_text()" multiple times. from_file() my $graph = $parser->from_file( $filename ); my $graph = Graph::Easy::Parser->from_file( $filename ); Creates a Graph::Easy object from the textual description in the file $filename. The second calling style will create a temporary parser object, parse the file and return the resulting "Graph::Easy" object. Returns undef for error, you can find out what the error was with error() when using the first calling style. error() my $error = $parser->error(); Returns the last error, or the empty string if no error occured. parse_error() $parser->parse_error( $msg_nr, @params); Sets an error message from a message number and replaces embedded templates like "##param1##" with the passed parameters. CAVEATS
The parser has problems with the following things: encoding and charset attribute The parser assumes the input to be "utf-8". Input files in <code>Latin1</code> are not parsed properly, even when they have the charset attribute set. shape=record Nodes with shape record are only parsed properly when the label does not contain groups delimited by "{" and "}", so the following is parsed wrongly: node1 [ shape=record, label="A|{B|C}" ] default shape The default shape for a node is 'rect', opposed to 'circle' as dot renders nodes. attributes Some attributes are not remapped properly to what Graph::Easy expects, thus losing information, either because Graph::Easy doesn't support this feature yet, or because the mapping is incomplete. Some attributes meant only for nodes or edges etc. might be incorrectly applied to other objects, resulting in unnec. warnings while parsing. Attributes not valid in the original DOT language are silently ignored by dot, but result in a warning when parsing under Graph::Easy. This helps catching all these pesky misspellings, but it's not yet possible to disable these warnings. comments Comments written in the source code itself are discarded. If you want to have comments on the graph, clusters, nodes or edges, use the attribute "comment". These are correctly read in and stored, and then output into the different formats, too. EXPORT
Exports nothing. SEE ALSO
Graph::Easy, Graph::Reader::Dot. AUTHOR
Copyright (C) 2005 - 2007 by Tels <http://bloodgate.com> See the LICENSE file for information. perl v5.14.2 2011-12-23 Graph::Easy::Parser::Graphviz(3pm)
All times are GMT -4. The time now is 11:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy