Sponsored Content
Full Discussion: Increment counter in ksh
Top Forums Shell Programming and Scripting Increment counter in ksh Post 44196 by liliput on Tuesday 2nd of December 2003 07:10:31 AM
Old 12-02-2003
Hi Keith,

Many thaks for answering.

you're right. it works fine.

MAny thanks.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

counter / increment problem within echo stmt

Simple script trying to increment a counter within an echo statement never gets past 1 - PLEASE HELP! Thanks. ~~~~~~~~~~~ #!/bin/sh stepup() { STEP=`expr $STEP + 1` echo $STEP } # # Initialize variables # STEP=0 echo "Counter Value: `stepup`" echo "Counter Value:... (2 Replies)
Discussion started by: blaze
2 Replies

2. Shell Programming and Scripting

counter

Hi, I need some help. Shell script counter. i need to add condition to check if counter is more than 10 and longer than 3 hours? it runs every 5 mins. it only check count and send email right now. it runs in cron as below gregcount.ksh gregdb 10 > /tmp/gregcount.out 2> /tmp/gregcount.err ... (1 Reply)
Discussion started by: pega
1 Replies

3. Shell Programming and Scripting

Increment a floating number in ksh

Hi ! How to increment a varibale in ksh. #!/bin/ksh set -x RELEASE_NUM=5.2.103 VAL=0.0.1 RELEASE_NUM=`echo $RELEASE_NUM + $VAL | bc` echo $RELEASE_NUM The above code is throwing this error. + RELEASE_NUM=5.2.103 (2 Replies)
Discussion started by: dashok.83
2 Replies

4. Shell Programming and Scripting

increment counter as suffix starting with the rightmost digit

Hi, I would like to add a suffix to a file name but maintain the suffix length to 5 digits. For eg, output > 1st_file.00001, 2nd_file.00002...10th_file.00010....100th_file.00100 Can anyone please advise me on how to go about it? Platform: SunOS mps201a 5.9 Generic_118558-39 sun4u... (7 Replies)
Discussion started by: danish0909
7 Replies

5. Shell Programming and Scripting

Counter

if ;then echo "mrnet greater 5000" gzip /var/log/mrnet.log mv /var/log/mrnet.log.gz /var/log/mrnet.log.1.gz if ];then i=1 let i++ mv /var/log/mrnet.log.1.gz /var/log/vieux-logs/mrnet.log.$i.gz else echo "theres no... (1 Reply)
Discussion started by: Froob
1 Replies

6. Shell Programming and Scripting

Help require with counter

I have this file 1801,A1,2012-12-16 15:59:59.995,id2_3,ab,phoneC2-00,VOE,,,,,,,,,,,,,,, 1802,A1,2012-12-16 15:59:59.995,id2_3,ab=,phoneX1-01,BL,,,,,,,,,,,,,,, 1803,A1,2012-12-16 15:59:59.995,id2_3,ab,phone300,BL,,,,,,,,,,,,,,, 1804,A1,2012-12-16... (4 Replies)
Discussion started by: nikhil jain
4 Replies

7. UNIX for Dummies Questions & Answers

Pegging counter

Hi Experts, I am in need for some help. My competence level on unix is not at all helping me to resolve this. Please help. My Input for a system command is as under: Counters are getting pegged each hour. I need to have a difference printed rather than pegged counter values. Counter... (2 Replies)
Discussion started by: vanand420
2 Replies

8. Shell Programming and Scripting

Comparison of fields then increment a counter reading line by line in a file

Hi, i have a scenario were i should compare a few fields from each line then increment a variable based on that. Example file 989878|8999|Y|0|Y|N|V 989878|8999|Y|0|N|N|V 989878|8999|Y|2344|Y|N|V i have 3 conditions to check and increment a variable on every line condition 1 if ( $3... (4 Replies)
Discussion started by: selvankj
4 Replies

9. Shell Programming and Scripting

Do i miss counter or what

hello this script should show all users and space they used without problem : ls /home >> /root/users.txt cat /root/users.txt | while read line; do space=`du -s /home/$line` echo "$line space is $space" shift done but when i remove pipe ,script run without any output: ls /home... (4 Replies)
Discussion started by: nimafire
4 Replies

10. Shell Programming and Scripting

Bash counter increment not working

Hi all, I'm using Bash 4.3.8 on an Ubuntu system, and no matter what I try, incrementing a counter won't work. The simplest example would be something like this: #!/bin/bash myVar=0 myVar=$((myVar++)) echo myVar The variable should be 1, but it's always 0. I've tried every increment... (6 Replies)
Discussion started by: Zel2008
6 Replies
Template::Stash::XS(3)					User Contributed Perl Documentation				    Template::Stash::XS(3)

NAME
Template::Stash::XS - High-speed variable stash written in C SYNOPSIS
use Template; use Template::Stash::XS; my $stash = Template::Stash::XS->new(\%vars); my $tt2 = Template->new({ STASH => $stash }); DESCRIPTION
The Template:Stash::XS module is an implementation of the Template::Stash written in C. The "XS" in the name refers to Perl's XS extension system for interfacing Perl to C code. It works just like the regular Perl implementation of Template::Stash but runs about twice as fast. The easiest way to use the XS stash is to configure the Template Toolkit to use it by default. You can do this at installation time (when you run "perl Makefile.PL") by answering 'y' to the questions: Do you want to build the XS Stash module? y Do you want to use the XS Stash by default? y See the INSTALL file distributed with the Template Toolkit for further details on installation. If you don't elect to use the XS stash by default then you should use the "STASH" configuration item when you create a new Template object. This should reference an XS stash object that you have created manually. use Template; use Template::Stash::XS; my $stash = Template::Stash::XS->new(\%vars); my $tt2 = Template->new({ STASH => $stash }); Alternately, you can set the $Template::Config::STASH package variable like so: use Template; use Template::Config; $Template::Config::STASH = 'Template::Stash::XS'; my $tt2 = Template->new(); The XS stash will then be automatically used. If you want to use the XS stash by default and don't want to re-install the Template Toolkit, then you can manually modify the "Template/Config.pm" module near line 42 to read: $STASH = 'Template::Stash::XS'; BUGS
Please report bugs to the Template Toolkit mailing list templates@template-toolkit.org AUTHORS
Andy Wardley <abw@wardley.org> <http://wardley.org/> Doug Steinwand <dsteinwand@citysearch.com> COPYRIGHT
Copyright (C) 1996-2012 Andy Wardley. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Template::Stash perl v5.16.3 2012-01-13 Template::Stash::XS(3)
All times are GMT -4. The time now is 10:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy