Sponsored Content
Top Forums Shell Programming and Scripting Need help on addition in shell Post 302538827 by Skrynesaver on Thursday 14th of July 2011 09:35:51 AM
Old 07-14-2011
Ahh, I think I see the issue now, you want to preserve a state so either the script re-writes itself (not a good plan and error prone Smilie ) or you store the state in an external file, say /tmp/MySQL_clean_up.state

though you could use at and at the end of the run
Code:
at now +10 days -f $0.sh

 

10 More Discussions You Might Find Interesting

1. Solaris

How to perform addition of two numbers in shell scripting in Solaris-10

Hi, I have a sh script which contains the following line TOTAL=$((e4-s4)) -> Where e4 and s4 are input got from the user. At the time of execution of this line the following error occurs test.sh: syntax error at line 8: `TOTAL=$' unexpected How to solve this issue?. Can any... (9 Replies)
Discussion started by: krevathi1912
9 Replies

2. Shell Programming and Scripting

addition

Hi all, I am new to perl. I need help adding bunch of numbers. I have a file look like this: 1 1 2 1 2 3 1 2 3 4 1 (2 Replies)
Discussion started by: email-lalit
2 Replies

3. Shell Programming and Scripting

Simple addition, help.

I add up the number of args that are not blank. It works, but the printout is a string that just keep concatenating on +1. So Ex. it goes through input of: bob toto " " tom ...I get 0+1+1+1, when all I want is 3. Any help is appreciated. count=0 for name in $* do if ; then ... (3 Replies)
Discussion started by: Bandit390
3 Replies

4. UNIX for Dummies Questions & Answers

addition in sh shell

I have to create un counter and I am unable to do an additition: #!/bin/sh count=$1 while ] do echo $count $count=$count+$1 done (1 Reply)
Discussion started by: cfg
1 Replies

5. Shell Programming and Scripting

Help with addition

Hi all, I am getting following output by using commands like sort, uniq and awk to the standard output. 110 d 40 a 59 c 9 b 3 e Now at the end I would like to add all the numbers in column 1 and display the count of all numbers i.e. (110 + 40 + 59 + 9 + 3). Also the output may... (3 Replies)
Discussion started by: tenderfoot
3 Replies

6. Shell Programming and Scripting

Addition

Hi all, I am very new to shell programming and trying to learn out the basics. I tried this: $ echo `expr 20 + 30` and it worked. But when i tried this,it does not work. $ a=20 $ b=30 $ echo `expr a + b` The error is: expr: non-numeric argument I cant understand why its... (3 Replies)
Discussion started by: gautamshaw
3 Replies

7. Shell Programming and Scripting

Addition Of New Fields

Hi, I want to add 3 new fields in the existing file.Please find the example below. input: UID: ABCD UNAME: XYZ Desired Output Tmiestamp: 20101208 UID: ABCD UNAME: XYZ DEPTNO:40 ModifyTImestamp:20101209 If you see the above i have added the 3 columns manually in the output section... (2 Replies)
Discussion started by: Nani7574
2 Replies

8. Shell Programming and Scripting

addition of decimal no

a=10.00 pattern=-11.00 b=`echo "$a $pattern" | awk ' printf("%d\n", $1 + $2)'` echo $b not working, also trined bc ,dc but thats not on my m/c. also expr not supporting. any clue? (6 Replies)
Discussion started by: saluja.deepak
6 Replies

9. UNIX for Dummies Questions & Answers

Limitation in addition

whats wrong with this addition? Whats the maximum number of digits can be handled? pandeeswaran@ubuntu:~/Downloads$ const=201234454654768979799999 pandeeswaran@ubuntu:~/Downloads$ let new+=const pandeeswaran@ubuntu:~/Downloads$ echo $new -2152890657037557890 pandeeswaran@ubuntu:~/Downloads$ (4 Replies)
Discussion started by: pandeesh
4 Replies

10. Shell Programming and Scripting

Addition to Bash shell script that emails final output as attachement?

Greetings. I have a nice bash shell script that runs a multi-step analysis well. I already have the SGE options set up to email me the progress of the run (started, completed, aborted), but a final step would be to code the shell script to email the final output (a .txt file) to the same email... (6 Replies)
Discussion started by: Twinklefingers
6 Replies
RDF::Query::Plan(3pm)					User Contributed Perl Documentation				     RDF::Query::Plan(3pm)

NAME
RDF::Query::Plan - Executable query plan nodes. VERSION
This document describes RDF::Query::Plan version 2.908. METHODS
"new" "execute ( $execution_context )" "next" "get_all" Returns all remaining rows. "close" "state ( [ $state ] )" Returns the current state of the plan (either READY, OPEN, or CLOSED). If $state is provided, updates the plan to a new state. "logging_keys" "explain" Returns a string serialization of the query plan appropriate for display on the command line. "sse" "serialize" Return a serialization of the query plan. "delegate" Returns the delegate object if available. "referenced_variables" Returns a list of variable names that are referenced by this plan. "as_iterator ( $context )" Returns an RDF::Trine::Iterator object for the current (already executed) plan. "is_update" Returns true if the plan represents an update operation. "label ( $label => $value )" Sets the named $label to $value for this plan object. If no $value is given, returns the current label value, or undef if none exists. "graph_labels" "generate_plans ( $algebra, $execution_context, %args )" Returns a list of equivalent query plan objects for the given algebra object. "plan_node_name" Returns the string name of this plan node, suitable for use in serialization. "plan_prototype" Returns a list of scalar identifiers for the type of the content (children) nodes of this plan node. These identifiers are recognized: * 'A' - An RDF::Query::Algebra object * 'b' - A boolean integer value (0 or 1) * 'E' - An expression (either an RDF::Query::Expression object or an RDF node) * 'i' - An integer * 'J' - A valid Project node (an RDF::Query::Expression object or an Variable node) * 'N' - An RDF node * 'P' - A RDF::Query::Plan object * 'q' - A RDF::Query object * 'Q' - An RDF::Trine::Statement::Quad object * 's' - A string * 'T' - An RDF::Trine::Statement object * 'u' - A valid URI string * 'V' - A variable binding set (an object of type RDF::Query::VariableBindings) * 'w' - A bareword string * 'W' - An RDF node or wildcard ('*') * '*X' - A list of X nodes (where X is another identifier scalar) * 'X' - An array reference of X nodes (where X is another identifier scalar) "plan_node_data" Returns the data for this plan node that corresponds to the values described by the signature returned by "plan_prototype". "subplans_of_type ( $type [, $block] )" Returns a list of Plan objects matching $type (tested with "isa"). If $block is given, then matching stops descending a subtree if the current node is of type $block, continuing matching on other subtrees. This list includes the current plan object if it matches $type, and is generated in infix order. AUTHOR
Gregory Todd Williams <gwilliams@cpan.org> perl v5.14.2 2012-01-31 RDF::Query::Plan(3pm)
All times are GMT -4. The time now is 09:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy