Sponsored Content
Full Discussion: Running Total Running Wild
Top Forums Shell Programming and Scripting Running Total Running Wild Post 302401967 by Ccccc on Monday 8th of March 2010 11:29:33 AM
Old 03-08-2010
I tried this, with no luck.
Code:
let counter=$counter+1
let total=$total+$sales

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to prevent job1 from running while job2 is running..

Hi, Please I need your expert advise on how to prevent/lock from execution job1 while job2 is still running in Unix... THanks:) (3 Replies)
Discussion started by: tikang
3 Replies

2. UNIX for Dummies Questions & Answers

grep running total/ final total across multiple files

Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies

3. Shell Programming and Scripting

Running Total

HPUX 11i v2 #!/bin/sh Hi all. I have a space delimited flat file of about 9000 lines. I would like to get a running total of field 3 to the variable $TOTAL. Field 3 can be formatted as listed.... $ 0.00 $2804.15 <$ 4.14> (negative) Any ideas are most appreciated!!!! TIA!! (9 Replies)
Discussion started by: lyoncc
9 Replies

4. Solaris

Running from Shell Vs running from RC script

Hi, i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell. How do i distinguish whether my script is run by init process or by shell?? Will the command /proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies

5. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

6. Shell Programming and Scripting

Print available running instance out of total

Hello. I have a status command in AIX box, which provides output as below: $ status You are running the application on pegasus2 ----Program Name------|--Avail / Total---------| MQ | 1/2 | ORACLE | 10/10 | TMADMIN ... (3 Replies)
Discussion started by: panchpan
3 Replies

7. Shell Programming and Scripting

Cron job running for some days and is not running for some days

Hi.. i have written a shell script and made this script to run on every day night 11: 55 pm using a cron job. This cron job running for some days and is not running for some day. but i need this script to run every day night. Please help me. Here is the cron tab entries, 55 23 * * *... (1 Reply)
Discussion started by: vidhyaS
1 Replies

8. Shell Programming and Scripting

How to know how many files are running.?

Hi friends I want to know can we check how many php files are running currently or can we know that a file is running or not. Maine issue is that i am running two or three files, there are lots of code on them, each files takes 20 minutes to complete. i want to know that first file is... (7 Replies)
Discussion started by: sanjay833i
7 Replies

9. Shell Programming and Scripting

Why script is running sometimes and not running sometimes?

Hi, I have a script which does couple of database connection and run some SELECT queries to get some output in the file. I am surprised to see :eek: that when i run my script some times it gives the desired out put and sometimes it shows some error :confused: . Suppose if i execute it say... (3 Replies)
Discussion started by: Sharma331
3 Replies
XML::LibXML::Devel(3)					User Contributed Perl Documentation				     XML::LibXML::Devel(3)

NAME
XML::LibXML::Devel - makes functions from LibXML.xs available SYNOPSIS
/********************************************** * C functions you want to access */ xmlNode *return_node(); void receive_node(xmlNode *); ############################################### # XS Code void * xs_return_node CODE: RETVAL = return_node(); OUTPUT: RETVAL void xs_receive_node void *n CODE: receive_node(n); ############################################### # Perl code use XML::LibXML::Devel; sub return_node { my $raw_node = xs_return_node(); my $node = XML::LibXML::Devel::node_to_perl($raw_node); XML::LibXML::Devel::refcnt_inc($raw_node); return $node; } sub receive_node { my ($node) = @_; my $raw_node = XML::LibXML::Devel::node_from_perl($node); xs_receive_node($raw_node); XML::LibXML::Devel::refcnt_inc($raw_node); } DESCRIPTION
"XML::LibXML::Devel" makes functions from LibXML.xs available that are needed to wrap libxml2 nodes in and out of XML::LibXML::Nodes. This gives cleaner dependencies than using LibXML.so directly. To XS a library that uses libxml2 nodes the first step is to do this so that xmlNodePtr is passed as void *. These raw nodes are then turned into libxml nodes by using this "Devel" functions. Be aware that this module is currently rather experimental. The function names may change if I XS more functions and introduce a reasonable naming convention. Be also aware that this module is a great tool to cause segfaults and introduce memory leaks. It does however provide a partial cure by making "xmlMemUsed" available as "mem_used". FUNCTIONS
NODE MANAGEMENT node_to_perl node_to_perl($raw_node); Returns a LibXML::Node object. This has a proxy node with a reference counter and an owner attached. The raw node will be deleted as soon as the reference counter reaches zero. If the C library is keeping a pointer to the raw node, you need to call refcnt_inc immediately. You also need to replace xmlFreeNode by a call to refcnt_dec. node_to_perl node_from_perl($node); Returns a raw node. This is a void * pointer and you can do nothing but passing it to functions that treat it as an xmlNodePtr. The raw node will be freed as soon as its reference counter reaches zero. If the C library is keeping a pointer to the raw node, you need to call refcnt_inc immediately. You also need to replace xmlFreeNode by a call to refcnt_dec. refcnt_inc refcnt_inc($raw_node); Increments the raw nodes reference counter. The raw node must already be known to perl to have a reference counter. refcnt_dec refcnt_dec($raw_node); Decrements the raw nodes reference counter and returns the value it had before. if the counter becomes zero or less, this method will free the proxy node holding the reference counter. If the node is part of a subtree, refcnt_dec will fix the reference counts and delete the subtree if it is not required any more. refcnt refcnt($raw_node); Returns the value of the reference counter. fix_owner fix_owner($raw_node, $raw_parent); This functions fixes the reference counts for an entire subtree. it is very important to fix an entire subtree after node operations where the documents or the owner node may get changed. this method is aware about nodes that already belong to a certain owner node. MEMORY DEBUGGING $ENV{DEBUG_MEMORY} BEGIN {$ENV{DEBUG_MEMORY} = 1;}; use XML::LibXML; This turns on libxml2 memory debugging. It must be set before XML::LibXML is loaded. mem_used mem_used(); Returns the number of bytes currently allocated. EXPORT None by default. SEE ALSO
This was created to support the needs of Apache2::ModXml2. So this can serve as an example. AUTHOR
Joachim Zobel <jz-2011@heute-morgen.de> COPYRIGHT AND LICENSE
Copyright (C) 2011 by Joachim Zobel This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available. perl v5.16.2 2012-10-22 XML::LibXML::Devel(3)
All times are GMT -4. The time now is 05:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy