Sponsored Content
Full Discussion: List Counter
Top Forums Shell Programming and Scripting List Counter Post 302603306 by clx on Wednesday 29th of February 2012 01:34:10 PM
Old 02-29-2012
Changing RS also does the trick.

Code:
$ awk 'NF>0{print $2,(gsub("\n",""))-1}' RS="Month" file
Jan 2
Feb 3
Mar 0
APR 2
$

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

counter in a variable - can it be done?

I have the following for(( i=1; 1<=2; i++)) do e1=123 n1=123 e2=456 n2=456 coord= $e1,$n1 echo "coordinate=$coord" done exit this echos coordinate=123,123 I need it to loop so: loop1 coord=$e1,$n1 loop2 (3 Replies)
Discussion started by: gazz1982
3 Replies

2. Shell Programming and Scripting

counter problem

Hi, I'm attempting to take the following input list and create an output file as shown below. I've monkeyed around for long enough. Can anyone help? NOTE: fs*** will be header and I want to get a count on NY**. fs200a NY7A fs200b NY7B NY7B NY7B fs200c NY7C NY7C NY7C NY7C... (2 Replies)
Discussion started by: jwholey
2 Replies

3. 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

4. Shell Programming and Scripting

grep and counter

Hi, I have such an example(ksh): name1=Example directory=/directory1/Example/directory2 match=$(grep -s '$name1' $directory | wc -l) echo $match But it replies to me: 0 What I expect from it, is to find $name1 in $directory and produce 1 for me as true, not false. (3 Replies)
Discussion started by: chish
3 Replies

5. Shell Programming and Scripting

DelimiterCount: how to use a counter

Hi, I am new to shell script. I want to count to Delimiter count for my source file. For that I have written script. When I tried to execute the script I could not able to view the results. It throws errors. I don't know what the problem is. My aim is I want to store the delimiter count in one... (4 Replies)
Discussion started by: suresh01_apk
4 Replies

6. Shell Programming and Scripting

problem with counter

i having a file xxxxxxxxxxxxxxx1234 ...........value can be change xxxxxxxxxxxxxxx1235 xxxxxxxxxxxxxxxx1236 . . . . xxxxxxxxxxxxxxxxx1300 ...........value can be change i want to cut last four characters of first line and last line and find the missing pattern. output should... (4 Replies)
Discussion started by: sagar_1986
4 Replies

7. 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

8. 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

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
pytrainer(7)						 Miscellaneous Information Manual					      pytrainer(7)

NAME
pytrainer - sport activity logging tool SYNOPSIS
pytrainer [options] DESCRIPTION
pytrainer is a tool to log all sport excursions coming from GPS devices (with a focus on ForeRunnner 205, 305 and 405) or GPX (http://www.topografix.com) files. Pytrainer supports GPS track files and displays it in graphs, maps... OPTIONS
-h, --help show this help message and exit -d, --debug enable logging at debug level -i, --info enable logging at info level -w, --warn enable logging at warning level --valid enable validation of files imported by plugins (details at info or debug logging level) - note plugin must support validation --check triggers database (only sqlite based) and configuration file sanity checks, adding fields if necessary. Backup of database is done before any change. Details at info or debug logging level --oldgraph Turn off new graphing approach --newgraph Deprecated option: turn on new graphing approach --confdir=CONF_DIR Specify the directory where application configuration will be stored. --logtype=TYPE Specify where logging should be output to. TYPE is one of 'file' (default), or 'console'. EXAMPLES
pytrainer starts pytrainer with log level set to ERROR pytrainer -d starts pytrainer with log level set to DEBUG (troubleshooting) AUTHORS
This manual page was originally written by Braulio Valdivielso <brlvldvlsmrtnz@gmail.com> and polished by Christian Perrier <bubulle@debian.org>. For more information please check 'Credits' in 'About' menu. Thanks to everyone who contributes and supports pytrainer. SEE ALSO
Project web site: http://sourceforge.net/apps/trac/pytrainer/ Distribution list: pytrainer-devel@lists.sourceforge.net version 1.0 2011-08-29 pytrainer(7)
All times are GMT -4. The time now is 07:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy